From: Geoff Lansberry <geoff@kuvee.com>
To: Mark Greer <mgreer@animalcreek.com>
Cc: linux-wireless <linux-wireless@vger.kernel.org>,
Lauro Ramos Venancio <lauro.venancio@openbossa.org>,
Aloisio Almeida Jr <aloisio.almeida@openbossa.org>,
Samuel Ortiz <sameo@linux.intel.com>,
Justin Bronder <justin@kuvee.com>
Subject: Re: [Patch] NFC: trf7970a:
Date: Wed, 14 Dec 2016 11:17:33 -0500 [thread overview]
Message-ID: <CAO7Z3WKqhS5Q6qAaDs8364KP5-7ma=b_ic2B10=njngMmp5noQ@mail.gmail.com> (raw)
In-Reply-To: <20161214155743.GA22282@animalcreek.com>
On Wed, Dec 14, 2016 at 10:57 AM, Mark Greer <mgreer@animalcreek.com> wrote:
>
> On Tue, Dec 13, 2016 at 08:50:04PM -0500, Geoff Lansberry wrote:
> > Hi Mark - Thanks for getting back to me. It's funny that you ask,
> > because we are currently chasing a segfault that is happening in neard, but
> > may end up back in the trf7970a driver. Have you ever heard on anyone
> > having segfault problems related to the trf7970a hardware drivers?
>
> No. Mind sharing more info on that segfault?
>
> > I'll get you an update later tonight or tomorrow.
>
> Okay, thanks.
>
> Mark
> --
Mark - The segfault issue is only happening on writing, The work on
the segfault is being done by a consultant, but here is his statement
on how to recreate it on our build:
I am able to reliably force neard to segfault by flooding it with
write requests. I have attached a python script called flood.py that
can be used to do this. The script uses utilities that ship with
neard.
The segfault does not appear deterministic. It usually happens within
1000 writes, but the time can varying greatly. The logs output from
neard are inconsistent between crashes, which suggests this may be a
timing or race condition related issue.
I have been running neard manually to obtain the log information and a
core file for debugging (attached). I run neard as,
$ /usr/lib/neard/nfc/neard -d -n
In a separate terminal I run,
$ python flood.py
And the resulting core file provides the following backtrace,
(gdb) bt
#0 0xb6caed64 in ?? ()
#1 0x0001ed7c in data_recv (resp=0x5bd90 "", length=17, data=0x58348)
at plugins/nfctype2.c:156
#2 0x00024ecc in execute_recv_cb (user_data=0x5bd88) at src/adapter.c:979
#3 0xb6e70d60 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)
The line at nfctype2.c:156 contains a memcpy operation.
Below is the flood.py script:
#!/usr/bin/python
import neardutils
import dbus
import time
bus = dbus.SystemBus()
DURATION = 0.05
def write():
# Get an adapter interface
objects = neardutils.get_managed_objects()
for path, interfaces in objects.iteritems():
if "org.neard.Adapter" in interfaces:
break
else:
raise Exception("Unable to find adapter")
print("adapter object path: " + path)
adapter = dbus.Interface(bus.get_object("org.neard", path),
"org.freedesktop.DBus.Properties")
# power cycle
try:
adapter.Set("org.neard.Adapter", "Powered", dbus.Boolean(0))
time.sleep(DURATION)
except:
pass
try:
adapter.Set("org.neard.Adapter", "Powered", dbus.Boolean(1))
time.sleep(DURATION)
except:
pass
# Set polling
adapter = dbus.Interface(bus.get_object("org.neard", path),
"org.neard.Adapter")
adapter.StartPollLoop("Initiator")
time.sleep(DURATION)
# write tag
objects = neardutils.get_managed_objects()
for path, interfaces in objects.iteritems():
if "org.neard.Tag" in interfaces:
break
else:
raise Exception("Unable to find tag")
print("tag object path: " + path)
time.sleep(DURATION)
tag = dbus.Interface(bus.get_object("org.neard", path), "org.neard.Tag")
tag.Write(({
"Type": "Text",
"Encoding": "UTF-8",
"Language": "en",
"Representation": "omen_red_2014",
}))
time.sleep(DURATION)
objects = neardutils.get_managed_objects()
for path, interfaces in objects.iteritems():
if "org.neard.Record" in interfaces:
break
else:
raise Exception("Unable to read record")
print("record object path: " + path)
time.sleep(DURATION)
record = dbus.Interface(bus.get_object("org.neard", path),
"org.freedesktop.DBus.Properties")
print("representation: " + record.Get("org.neard.Record", "Representation"))
def main():
for iteration in range(1000):
try:
print("==================================================")
print("iteration: " + str(iteration))
write()
print("SUCCESS")
except Exception,e:
print(str(e))
print("FAILURE")
if __name__ == "__main__":
main()
-----
If we find the source of the problem, we will share it upstream. If
you have any thoughts on where to look, please share.
Geoff Lansberry
next prev parent reply other threads:[~2016-12-14 16:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-18 19:48 [Patch] NFC: trf7970a: Geoff Lansberry
2016-04-18 19:48 ` [PATCH 1/4] NFC: trf7970a: Add support for gpio as SS Geoff Lansberry
2016-04-19 0:07 ` Julian Calaby
[not found] ` <CAO7Z3WJofeT4agChaZ-NQ5TwrMygdGRhG7myJkNuEb9i_g-Y=A@mail.gmail.com>
2016-04-20 1:24 ` Geoffrey Lansberry
2016-04-18 19:48 ` [PATCH 2/4] NFC: trf7970a: add TI recommended write of zero to Register 0x18 Geoff Lansberry
2016-04-18 19:48 ` [PATCH 3/4] NFC: trf7970a: add device tree option for 27MHz clock Geoff Lansberry
2016-04-19 0:11 ` Julian Calaby
2016-04-18 19:48 ` [PATCH 4/4] NFC: trf7970a: Add device tree option of 1.8 Volt IO voltage Geoff Lansberry
2016-04-19 0:12 ` Julian Calaby
2016-04-22 0:01 ` [Patch] NFC: trf7970a: Mark Greer
2016-12-13 22:05 ` Mark Greer
[not found] ` <CAO7Z3WJwf80mCqubSYTeK=BHN9sd=mzmL9th4Su-E25de6TmAg@mail.gmail.com>
2016-12-14 15:57 ` Mark Greer
2016-12-14 16:17 ` Geoff Lansberry [this message]
2016-12-14 17:10 ` Mark Greer
2016-12-14 18:35 ` Geoff Lansberry
2016-12-14 22:31 ` Mark Greer
2016-12-16 4:52 ` Mark Greer
2016-12-16 20:35 ` Mark Greer
2016-12-17 21:19 ` Geoff Lansberry
2016-12-19 3:07 ` Mark Greer
2017-02-08 22:53 ` Mark Greer
2017-02-08 22:56 ` Mark Greer
2017-02-09 15:54 ` Geoff Lansberry
2017-02-09 21:27 ` Mark Greer
2017-02-10 0:41 ` Geoff Lansberry
2017-02-10 4:20 ` Mark Greer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAO7Z3WKqhS5Q6qAaDs8364KP5-7ma=b_ic2B10=njngMmp5noQ@mail.gmail.com' \
--to=geoff@kuvee.com \
--cc=aloisio.almeida@openbossa.org \
--cc=justin@kuvee.com \
--cc=lauro.venancio@openbossa.org \
--cc=linux-wireless@vger.kernel.org \
--cc=mgreer@animalcreek.com \
--cc=sameo@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).