• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: Writing to Samba typically crashes system: kernel dma bug?  (Read 1338 times)
rektide
Newbie
*

Karma: 0
Posts: 17



View Profile WWW
« on: November 29, 2009, 11:37:46 PM »

I'm running Debian Testing's Samba 3.4.3-1 on an OpenRD running 2.6.32-rc7 (compiled Nov 14th fresh from Torvalds' master).  Its not a regression, I've seen the same behavior across quite a variety of kernel versions.

Writing to Samba hard locks my system.  I can read file off samba fine, at approximately 36MB/s, and browse my samba shares.  However, almost any writing to samba crashes the system.  I've managed to copy 1K files onto the system, but as soon as I try even a 16K file, the system hard locks.  Further adding to strangeness, if I edit a file from Windows, and write 1MB text into the file, I can save the file and samba appears to be just happy.  Its only when I attempt to copy in a not-insigificant sized file that my openrd hard locks.  Eventually, I get a stream of messages to this effect on the serial console:

Code:
Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
thuban:~# [1308365.157740] BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0]
[1308365.163867] Modules linked in: raid0 raid1 md_mod cifs nfsd exportfs sco br                                                    idge stp llc bnep rfcomm l2cap bluetooth autofs4 ipt_MASQUERADE iptable_nat nf_n                                                    at nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables ipv6 snd_usb                                                    _audio snd_pcm snd_page_alloc snd_usb_lib snd_seq_midi snd_seq_midi_event snd_ra                                                    wmidi snd_hwdep rtl8187 snd_seq mac80211 snd_timer snd_seq_device snd cfg80211 s                                                    oundcore rfkill eeprom_93cx6 mv_cesa
[1308365.202461]
[1308365.204128] Pid: 0, comm:              swapper
[1308365.208769] CPU: 0    Not tainted  (2.6.32-rc7-thuban #1)
[1308365.214374] PC is at feroceon_range_dma_inv_range+0x4/0x40
[1308365.220063] LR is at dma_cache_maint_page+0x88/0xc0
[1308365.225138] pc : [<c0034f24>]    lr : [<c0031d08>]    psr: 60000013
[1308365.225144] sp : c05abcb8  ip : 09dc78c0  fp : df9604b8
[1308365.237028] r10: 0000006c  r9 : c9dc7858  r8 : 0000006c
[1308365.242453] r7 : 00000f94  r6 : c0816520  r5 : c0031ac0  r4 : c068a370
[1308365.249185] r3 : c0034f20  r2 : 60000013  r1 : cb6aa000  r0 : cb6a9f94
[1308365.255918] Flags: nZCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment ke                                                    rnel
[1308365.263434] Control: 0005317f  Table: 0151c000  DAC: 00000017

[1308430.657740] BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0]
[1308430.663868] Modules linked in: raid0 raid1 md_mod cifs nfsd exportfs sco bridge stp llc bnep rfcomm l2cap bluetooth autofs4 ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables ipv6 snd_usb_audio snd_pcm snd_page_alloc snd_usb_lib snd_seq_midi snd_seq_midi_event snd_rawmidi snd_hwdep rtl8187 snd_seq mac80211 snd_timer snd_seq_device snd cfg80211 soundcore rfkill eeprom_93cx6 mv_cesa
[1308430.702462]
[1308430.704129] Pid: 0, comm:              swapper
[1308430.708770] CPU: 0    Not tainted  (2.6.32-rc7-thuban #1)
[1308430.714373] PC is at dma_cache_maint_page+0x88/0xc0
[1308430.719452] LR is at dma_cache_maint_page+0x88/0xc0
[1308430.724528] pc : [<c0031d08>]    lr : [<c0031d08>]    psr: 20000013
[1308430.724534] sp : c05abcb8  ip : 09dc78c0  fp : df9604b8
[1308430.736419] r10: 0000006c  r9 : c9dc7858  r8 : 0000006c
[1308430.741844] r7 : 00000f94  r6 : c0816520  r5 : c0031ac0  r4 : c068a370
[1308430.748576] r3 : 60000093  r2 : 60000013  r1 : cb6a9fff  r0 : cb6a9f94
[1308430.755309] Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[1308430.762824] Control: 0005317f  Table: 0151c000  DAC: 00000017

[1308496.147739] BUG: soft lockup - CPU#0 stuck for 61s! [swapper:0]
[1308496.153867] Modules linked in: raid0 raid1 md_mod cifs nfsd exportfs sco bridge stp llc bnep rfcomm l2cap bluetooth autofs4 ipt_MASQUERADE iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 ip_tables x_tables ipv6 snd_usb_audio snd_pcm snd_page_alloc snd_usb_lib snd_seq_midi snd_seq_midi_event snd_rawmidi snd_hwdep rtl8187 snd_seq mac80211 snd_timer snd_seq_device snd cfg80211 soundcore rfkill eeprom_93cx6 mv_cesa
[1308496.192461]
[1308496.194127] Pid: 0, comm:              swapper
[1308496.198769] CPU: 0    Not tainted  (2.6.32-rc7-thuban #1)
[1308496.204375] PC is at feroceon_l2_clean_range+0x74/0x94
[1308496.209714] LR is at feroceon_l2_clean_range+0x34/0x94
[1308496.215051] pc : [<c00351f0>]    lr : [<c00351b0>]    psr: 40000013
[1308496.215057] sp : c05abca8  ip : 09dc78c0  fp : df9604b8
[1308496.226942] r10: 0000006c  r9 : c9dc7858  r8 : df9604b8
[1308496.232367] r7 : df960920  r6 : 0000006c  r5 : 09dc78e0  r4 : 09dc78e0
[1308496.239098] r3 : c9dc78c0  r2 : c9dc7840  r1 : 40000013  r0 : 09dc78e0
[1308496.245830] Flags: nZcv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment kernel
[1308496.253346] Control: 0005317f  Table: 0151c000  DAC: 00000017

I havent been able to coax any good logging out of samba or the system.   I have samba setup to log verbosely to syslog (/etc/samba/smb.conf):

Code:
[global]
syslog = 9

And syslog setup to spew to ttyUSB0 (/etc/syslog.conf):

Code:
daemon,mail.*;\
        news.=crit;news.=err;news.=notice;\
        *.=debug;*.=info;\
        *.=notice;*.=warn       /dev/ttyS0

In spite of this logging, I'm not getting any samba logging to console.  I'd expect at least to see stuff like /var/log/samba/log.kato, which has basic connect info like:
Code:
[2009/11/29 23:17:54,  1] smbd/service.c:1047(make_connection_snum)
  kato (::ffff:10.50.50.8) connect to service rektide initially as user rektide (uid=1000, gid=1000) (pid 2057)

This is keeping me from having a very nice OpenRD NAS setup, and has generally confounded the hell out of me.  Aside from the stack traces that slowly trickle in, I dont really have any idea what is causing this completely neurotic behavior.  The stack traces are inside dma routines though, which is _suspicious_, very suspicious.

I've tried reading/writing from usb flash, nand ubifs root, and my esata md0/raid1 and md1/raid0 arrays.  I can read off any of them just fine.  Writing to any device causes the lockup.

Regards,
rektide
Logged

DamonHD
Full Member
***

Karma: 4
Posts: 169


View Profile WWW
« Reply #1 on: November 30, 2009, 02:42:08 AM »

I wonder if the issue is writes from more than one page, ie that cross a page boundary.  Can you see what size chunk the Windows client sends the data in and if the chunks are aligned, eg to a 4-byte or even a page (4kByte) boundary.

I have no idea how the MMU is set up in the SheevaPlug, but it's the sort of tricky case that wary M$ clients may have been working around for years to protect badly-written server code!  B^>

Rgds

Damon
« Last Edit: November 30, 2009, 05:04:35 PM by DamonHD » Logged

birdman
Sr. Member
****

Karma: 4
Posts: 443


View Profile WWW
« Reply #2 on: November 30, 2009, 02:43:20 PM »

What happens if you write to the same file system from something other than Samba?  Can you copy files around?  What about copying oddly aligned parts (with dd)?
Logged

Pages: [1]
Print
Jump to: