Raspberry Pi: owfs+w1+GPIO = freeze

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Raspberry Pi: owfs+w1+GPIO = freeze

Sven Geggus-5
Hello,

as an alternative to the DS2483 busmaster setup I just tried using
w1-gpio.

Unfortunately this will produce a system freeze :(

I'm uncertain if the problem is with the w1-gpio module, owfs or
both.

Here is what I do (stock version of owfs from raspian wheezy 2.8p15):

 ~/ # owserver --error_print 2 --error_level 99 --foreground --w1
NLMSGHDR: len=48 type=3 (NLMSG_DONE) flags=5 seq=0|1 pid=2004
CN_MSG: idx/val=3/1 (CN_W1_IDX) seq=0|1 ack=1 len=12 flags=0
W1_NETLINK_MSG: type=6 (W1_LIST_MASTERS) len=0 id=0
W1_NETLINK_CMD: NULL w1c field
NULL data
NLMSGHDR: len=52 type=3 (NLMSG_DONE) flags=0 seq=0|1 pid=0
CN_MSG: idx/val=3/1 (CN_W1_IDX) seq=0|1 ack=0 len=16 flags=0
W1_NETLINK_MSG: type=6 (W1_LIST_MASTERS) len=4 id=65556
W1_NETLINK_CMD: NULL w1c field
Byte buffer Data, length=4
--000: 01 00 00 00
   <....>
NLMSGHDR: len=48 type=3 (NLMSG_DONE) flags=0 seq=0|1 pid=0
CN_MSG: idx/val=3/1 (CN_W1_IDX) seq=0|1 ack=1 len=12 flags=0
W1_NETLINK_MSG: type=6 (W1_LIST_MASTERS) len=0 id=0
W1_NETLINK_CMD: NULL w1c field
NULL data

...

Then I type "owdir" which produces the following output on owserver:


NLMSGHDR: len=52 type=3 (NLMSG_DONE) flags=5 seq=1|1 pid=2004
CN_MSG: idx/val=3/1 (CN_W1_IDX) seq=1|1 ack=65537 len=16 flags=0
W1_NETLINK_MSG: type=4 (W1_MASTER_CMD) len=4 id=1
W1_NETLINK_CMD: cmd=2 (W1_CMD_SEARCH) len=0
NULL data

... and hard freezes the system afterwords.

As tehe kernel reports an oops on the console I consider this to be a
bug in the w1-gpio provided by raspbian wheezy.

Does anybody know who is responsible for the Raspberry Pi adaption of
this module?

The hardware setup is very simple. Just a temperature sensor on the
gpio-pin and an additional pullup resistor on the gpio.

Unfortunately manual w1 access via sysfs works fine.


Regards

Sven

--
TCP/IP: telecommunication protocol for imbibing pilsners
                                     (Man-page uubp(1C) on Debian/GNU Linux)

/me is giggls@ircnet, http://sven.gegg.us/ on the Web

------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Raspberry Pi: owfs+w1+GPIO = freeze

Sven Geggus-5
Sven Geggus <[hidden email]> wrote:

> ... and hard freezes the system afterwords.

By connecting a serial cable I was able to capture the following:

[  124.782340] Unable to handle kernel paging request at virtual address fffffff8
[  124.794879] pgd = cab8c000
[  124.799807] [fffffff8] *pgd=0bffe821, *pte=00000000, *ppte=00000000
[  124.809255] Internal error: Oops: 17 [#1] PREEMPT

Entering kdb (current=0xcab3c2a0, pid 2043) Oops: (null)
due to oops @ 0xc0042d70

Pid: 2043, comm:             owserver
CPU: 0    Not tainted  (3.2.27+ #160)
PC is at kthread_should_stop+0x14/0x1c
LR is at w1_search+0x80/0x144 [wire]
pc : [<c0042d70>]    lr : [<bf0cf12c>]    psr: 20000013
sp : cab71cb8  ip : ffffffe0  fp : 00000040
r10: ffffffff  r9 : cba43400  r8 : 00000000
r7 : 00000000  r6 : 00000000  r5 : 00000000  r4 : 00000000
r3 : 00000000  r2 : cab71cb8  r1 : 00000020  r0 : 00000002
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 00c5387d  Table: 0ab8c008  DAC: 00000015
[<c0013e1c>] (unwind_backtrace+0x0/0xf0) from [<c0377b28>] (kdb_dumpregs+0x28/0x50)
[<c0377b28>] (kdb_dumpregs+0x28/0x50) from [<c0071a04>] (kdb_main_loop+0x504/0x758)
[<c0071a04>] (kdb_main_loop+0x504/0x758) from [<c0073fd0>] (kdb_stub+0x13c/0x368)
[<c0073fd0>] (kdb_stub+0x13c/0x368) from [<c006afd4>] (kgdb_handle_exception+0x1fc/0x69c)
[<c006afd4>] (kgdb_handle_exception+0x1fc/0x69c) from [<c001359c>] (kgdb_notify+0x24/0x40)
[<c001359c>] (kgdb_notify+0x24/0x40) from [<c037e700>] (notifier_call_chain+0x44/0x84)
[<c037e700>] (notifier_call_chain+0x44/0x84) from [<c037e778>] (__atomic_notifier_call_chain+0x38/0x4c)
[<c037e778>] (__atomic_notifier_call_chain+0x38/0x4c) from
[<c037e7a4>] (atomic_notifier_call_chain+0x18/0x20)
[<c037e7a4>] (atomic_notifier_call_chain+0x18/0x20) from [<c037e7e4>] (notify_die+0x38/0x44)

So still looking for the right place to report this.

Regards

Sven

--
"Dynamische IP-Nummern sind Security-Homöopathie."
                                                (Kristian Köhntopp)

/me is giggls@ircnet, http://sven.gegg.us/ on the Web

------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612 
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Raspberry Pi: owfs+w1+GPIO = freeze

Paul Alfille-2
I think the w1 kernel module has been broken for a while. Not just our code, but the module itself.

Paul Alfille

DS2483 should work, at least on x86 platforms.


On Wed, Jan 9, 2013 at 2:52 PM, Sven Geggus <[hidden email]> wrote:
Sven Geggus <[hidden email]> wrote:

> ... and hard freezes the system afterwords.

By connecting a serial cable I was able to capture the following:

[  124.782340] Unable to handle kernel paging request at virtual address fffffff8
[  124.794879] pgd = cab8c000
[  124.799807] [fffffff8] *pgd=0bffe821, *pte=00000000, *ppte=00000000
[  124.809255] Internal error: Oops: 17 [#1] PREEMPT

Entering kdb (current=0xcab3c2a0, pid 2043) Oops: (null)
due to oops @ 0xc0042d70

Pid: 2043, comm:             owserver
CPU: 0    Not tainted  (3.2.27+ #160)
PC is at kthread_should_stop+0x14/0x1c
LR is at w1_search+0x80/0x144 [wire]
pc : [<c0042d70>]    lr : [<bf0cf12c>]    psr: 20000013
sp : cab71cb8  ip : ffffffe0  fp : 00000040
r10: ffffffff  r9 : cba43400  r8 : 00000000
r7 : 00000000  r6 : 00000000  r5 : 00000000  r4 : 00000000
r3 : 00000000  r2 : cab71cb8  r1 : 00000020  r0 : 00000002
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 00c5387d  Table: 0ab8c008  DAC: 00000015
[<c0013e1c>] (unwind_backtrace+0x0/0xf0) from [<c0377b28>] (kdb_dumpregs+0x28/0x50)
[<c0377b28>] (kdb_dumpregs+0x28/0x50) from [<c0071a04>] (kdb_main_loop+0x504/0x758)
[<c0071a04>] (kdb_main_loop+0x504/0x758) from [<c0073fd0>] (kdb_stub+0x13c/0x368)
[<c0073fd0>] (kdb_stub+0x13c/0x368) from [<c006afd4>] (kgdb_handle_exception+0x1fc/0x69c)
[<c006afd4>] (kgdb_handle_exception+0x1fc/0x69c) from [<c001359c>] (kgdb_notify+0x24/0x40)
[<c001359c>] (kgdb_notify+0x24/0x40) from [<c037e700>] (notifier_call_chain+0x44/0x84)
[<c037e700>] (notifier_call_chain+0x44/0x84) from [<c037e778>] (__atomic_notifier_call_chain+0x38/0x4c)
[<c037e778>] (__atomic_notifier_call_chain+0x38/0x4c) from
[<c037e7a4>] (atomic_notifier_call_chain+0x18/0x20)
[<c037e7a4>] (atomic_notifier_call_chain+0x18/0x20) from [<c037e7e4>] (notify_die+0x38/0x44)

So still looking for the right place to report this.

Regards

Sven

--
"Dynamische IP-Nummern sind Security-Homöopathie."
                                                (Kristian Köhntopp)

/me is giggls@ircnet, http://sven.gegg.us/ on the Web

------------------------------------------------------------------------------
Master Java SE, Java EE, Eclipse, Spring, Hibernate, JavaScript, jQuery
and much more. Keep your Java skills current with LearnJavaNow -
200+ hours of step-by-step video tutorials by Java experts.
SALE $49.99 this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122612
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Raspberry Pi: owfs+w1+GPIO = freeze

Sven Geggus-5
Paul Alfille <[hidden email]> wrote:

> I think the w1 kernel module has been broken for a while. Not just our
> code, but the module itself.

In the meantime I discovered that this is not a Raspberry Pi Problem but a
generic Problem of the Kernel driver (most likely w1-gpio) as it does also
occur on the beaglebone:

https://plus.google.com/100242854243155306943/posts/eZKLqmCsDMV

Unfortunately the module kind of works as the problem only occurs with owfs
and not with the sysfs Interface of w1-therm.

For some puposes the solution with just 2 components (a sensor and a
resistor) would be nice to have.

So looks like we need to get a bug reported to the upstream kernel
maintainer.

> DS2483 should work, at least on x86 platforms.

Yes, DS2483 works fine on Raspberry Pi also.

Sven

--
Software patents are the software project equivalent of land mines: Each
design decision carries a risk of stepping on a patent, which can destroy
your project. (Richard M. Stallman)
/me is giggls@ircnet, http://sven.gegg.us/ on the Web

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Raspberry Pi: owfs+w1+GPIO = freeze

Tomasz Torcz-4
On Thu, Jan 10, 2013 at 08:52:01AM +0000, Sven Geggus wrote:
> Paul Alfille <[hidden email]> wrote:
>
> > I think the w1 kernel module has been broken for a while. Not just our
> > code, but the module itself.
>
> In the meantime I discovered that this is not a Raspberry Pi Problem but a
> generic Problem of the Kernel driver (most likely w1-gpio) as it does also
> occur on the beaglebone:
> https://plus.google.com/100242854243155306943/posts/eZKLqmCsDMV

  I had problems with w1 on x86, too:
https://bugzilla.redhat.com/show_bug.cgi?id=857954
  I'm not sure if the backtrace is the same.

--
Tomasz Torcz               RIP is irrevelant. Spoofing is futile.
xmpp: [hidden email]     Your routes will be aggreggated. -- Alex Yuriev


------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Raspberry Pi: owfs+w1+GPIO = freeze

Sven Geggus-5
Tomasz Torcz <[hidden email]> wrote:

>  I had problems with w1 on x86, too:
> https://bugzilla.redhat.com/show_bug.cgi?id=857954
>  I'm not sure if the backtrace is the same.

This is almost certainly the same Problem.

crash happens in w1_search function in both cases thus this looks like a
general Problem in w1 driver and not like a problem of the w1-gpio backend.

I will see if I can reproduce this with a current Kernel any mail the W1
maintainer if so.

Regards

Sven

--
"Das Einzige wovor wir Angst haben müssen ist die Angst selbst"
                                                (Franklin D. Roosevelt)

/me is giggls@ircnet, http://sven.gegg.us/ on the Web

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers
Reply | Threaded
Open this post in threaded view
|

Re: Raspberry Pi: owfs+w1+GPIO = freeze

Sven Geggus-5
Sven Geggus <[hidden email]> wrote:

> I will see if I can reproduce this with a current Kernel any mail the W1
> maintainer if so.

OK, exact same Problem on my x86 desktop machine using a DS9490.

I just reported the bug to the maintainer of the w1 subsystem and
the Linux Kernel Mailinglist.

Sven

--
"Der wichtigste Aspekt, den Sie vor der Entscheidung für ein Open
Source-Betriebssystem bedenken sollten, ist, dass Sie kein
Windows-Betriebssystem erhalten." (von http://www.dell.de/ubuntu)
/me is giggls@ircnet, http://sven.gegg.us/ on the Web

------------------------------------------------------------------------------
Master Visual Studio, SharePoint, SQL, ASP.NET, C# 2012, HTML5, CSS,
MVC, Windows 8 Apps, JavaScript and much more. Keep your skills current
with LearnDevNow - 3,200 step-by-step video tutorials by Microsoft
MVPs and experts. ON SALE this month only -- learn more at:
http://p.sf.net/sfu/learnmore_122712
_______________________________________________
Owfs-developers mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/owfs-developers