[Home]

Summary:ASTERISK-09469: Zaptel stop function in init script causes kernel crash (on FC3)
Reporter:seb7 (seb7)Labels:
Date Opened:2007-05-18 11:14:46Date Closed:2007-06-07 12:03:32
Priority:BlockerRegression?No
Status:Closed/CompleteComponents:Core/General
Versions:Frequency of
Occurrence
Related
Issues:
Environment:Attachments:( 0) zaptel.init_no_kernel_crash.patch
Description:Trying to stop zaptel via the init script causes a kernel crash every time on two Fedora Core 3 servers.

I have tracked down the problem to this line added in rev 2343:
$ZTCFG -s

(It was added due to issue 7409:
PCadach gave the reason as:
"Shutdown is required for dynamic spans, otherwise you will not be able to unload module correctly (it will be locked or, if no lock patch is applied - will crash kernel).")

Attached is rather silly patch until someone can fix it properly - I believe the real issue is that "$ZTCFG -s" is called, and rmmod wct4xxp is called immediately afterwards, without waiting for "$ZTCFG -s" to complete properly. If, with zaptel started, I run "ztcfg -s", wait about 5-10 seconds until I get:

Message from syslogd@IVRA6 at Fri May 18 17:07:26 2007 ...
IVRA6 kernel: Disabling IRQ ASTERISK-214

And _then_ run "/etc/init.d/zaptel stop" (with the $ZTCFG -s removed), zaptel unloads and there is no kernel crash.

Nearly a full working day gone on this!

****** ADDITIONAL INFORMATION ******

service zaptel stop
Unloading zaptel hardware drivers:
May 18 15:57:11 IVRA3 kernel: TE4XXP: Disabling interrupts since there are no active spans
May 18 15:57:11 IVRA3 kernel: Not prepped yet!
May 18 15:57:11 IVRA3 last message repeated 3921 times
May 18 15:57:11 IVRA3 kernel:
May 18 15:57:11 IVRA3 kernel: Stopped TE4XXP, Turned off DMA
May 18 15:57:11 IVRA3 kernel: Not prepped yet!

*System is blocked* - requires power off.
Comments:By: seb7 (seb7) 2007-05-21 05:43:47

It's probably worth adding that when I just do "ztcfg -s" I get this in the messages log:

May 18 17:07:26 IVRA6 kernel: Not prepped yet! [and more before this]
May 18 17:07:26 IVRA6 kernel: Not prepped yet!
May 18 17:07:26 IVRA6 kernel: Notreprepprepprepreppreppreppreprepreprepreprepprepreprepprepprepprepreppreppreprepreprepreppreprepreppreprepreprepreprepreppr
eppreprepreppreppreppreprepreprepprepreppreprepprepreppreppreppreppreppreppreprepprepprepprepprepreprepreprepprepreppreprepreprepprepreprepprepreppreprepp p
repped yet!
May 18 17:07:26 IVRA6 kernel: Not prepped yet!
May 18 17:07:26 IVRA6 last message repeated 6527 times
May 18 17:07:26 IVRA6 kernel: irq 217: nobody cared!
May 18 17:07:26 IVRA6 kernel:  [<c01436d4>] __report_bad_irq+0x24/0x7d
May 18 17:07:26 IVRA6 kernel:  [<c01437b6>] note_interrupt+0x6b/0x95
May 18 17:07:26 IVRA6 kernel:  [<c01432e4>] __do_IRQ+0x103/0x10f
May 18 17:07:26 IVRA6 kernel:  [<c0106570>] do_IRQ+0x50/0x89
May 18 17:07:26 IVRA6 kernel:  =======================
May 18 17:07:26 IVRA6 kernel:  [<c0104a2e>] common_interrupt+0x1a/0x20
May 18 17:07:26 IVRA6 kernel:  [<c0121868>] do_syslog+0x2b8/0x3d2
May 18 17:07:26 IVRA6 kernel:  [<c0160fb0>] vfs_read+0xad/0x108
May 18 17:07:26 IVRA6 kernel:  [<c016124b>] sys_read+0x41/0x6a
May 18 17:07:26 IVRA6 kernel:  [<c0103ff9>] syscall_call+0x7/0xb
May 18 17:07:26 IVRA6 kernel: handlers:
May 18 17:07:26 IVRA6 kernel: [<f8b1c3e8>] (t4_interrupt_gen2+0x0/0x60f7 [wct4xxp])
May 18 17:07:26 IVRA6 kernel: Disabling IRQ ASTERISK-214
May 18 17:07:33 IVRA6 kernel:
May 18 17:07:33 IVRA6 kernel: Stopped TE4XXP, Turned off DMA
May 18 17:07:34 IVRA6 kernel: Zapata Telephony Interface Unloaded

And again:
service zaptel start
<wait until it's finished>
ztcfg -s
<wait until I get this message:>
Message from syslogd@IVRA6 at Mon May 21 11:41:35 2007 ...
IVRA6 kernel: Disabling IRQ ASTERISK-214
tail /var/log/messages
May 21 11:41:35 IVRA6 kernel: !
May 21 11:41:35 IVRA6 kernel: Not prepped yet!
May 21 11:41:35 IVRA6 last message repeated 6453 times
May 21 11:41:35 IVRA6 kernel: irq 217: nobody cared!
May 21 11:41:35 IVRA6 kernel:  [<c01436d4>] __report_bad_irq+0x24/0x7d
May 21 11:41:35 IVRA6 kernel:  [<c01437b6>] note_interrupt+0x6b/0x95
May 21 11:41:35 IVRA6 kernel:  [<c01432e4>] __do_IRQ+0x103/0x10f
May 21 11:41:35 IVRA6 kernel:  [<c0106570>] do_IRQ+0x50/0x89
May 21 11:41:35 IVRA6 kernel:  =======================
May 21 11:41:35 IVRA6 kernel:  [<c0106577>] do_IRQ+0x57/0x89
May 21 11:41:35 IVRA6 kernel:  [<c0104a2e>] common_interrupt+0x1a/0x20
May 21 11:41:35 IVRA6 kernel:  [<f88ae699>] ext3_block_to_path+0x13/0x153 [ext3]
May 21 11:41:35 IVRA6 kernel:  [<f88aed76>] ext3_get_block_handle+0x36/0x34c [ext3]
May 21 11:41:35 IVRA6 kernel:  [<f88691b0>] megaraid_mbox_build_cmd+0x50a/0xd7c [megaraid_mbox]
May 21 11:41:35 IVRA6 kernel:  [<c0106577>] do_IRQ+0x57/0x89
May 21 11:41:35 IVRA6 kernel:  [<c011c8bb>] find_busiest_group+0xab/0x2e7
May 21 11:41:35 IVRA6 kernel:  [<c0106577>] do_IRQ+0x57/0x89
May 21 11:41:35 IVRA6 kernel:  [<f88af0de>] ext3_get_block+0x52/0x90 [ext3]
May 21 11:41:35 IVRA6 kernel:  [<c01650dc>] generic_block_bmap+0x31/0x3e
May 21 11:41:35 IVRA6 kernel:  [<c011cc9c>] load_balance+0x10e/0x172
May 21 11:41:35 IVRA6 kernel:  [<c023f5d5>] elv_next_request+0x2d/0x13f
May 21 11:41:35 IVRA6 kernel:  [<f88afaaa>] ext3_bmap+0x0/0x71 [ext3]
May 21 11:41:35 IVRA6 kernel:  [<f88afb13>] ext3_bmap+0x69/0x71 [ext3]
May 21 11:41:35 IVRA6 kernel:  [<f88af08c>] ext3_get_block+0x0/0x90 [ext3]
May 21 11:41:35 IVRA6 kernel:  [<f88afaaa>] ext3_bmap+0x0/0x71 [ext3]
May 21 11:41:35 IVRA6 kernel:  [<c01796d1>] bmap+0x25/0x32
May 21 11:41:35 IVRA6 kernel:  [<f887915f>] journal_bmap+0x2c/0x7c [jbd]
May 21 11:41:35 IVRA6 kernel:  [<c0104a2e>] common_interrupt+0x1a/0x20
May 21 11:41:35 IVRA6 kernel:  [<f88790a8>] journal_next_log_block+0x47/0xd2 [jbd]
May 21 11:41:35 IVRA6 kernel:  [<f8874a61>] __journal_temp_unlink_buffer+0x84/0x1f1 [jbd]
May 21 11:41:35 IVRA6 kernel:  [<f88791c1>] journal_get_descriptor_buffer+0x12/0x93 [jbd]
May 21 11:41:35 IVRA6 kernel:  [<f88756f7>] journal_write_commit_record+0x23/0xff [jbd]
May 21 11:41:35 IVRA6 kernel:  [<c016319c>] __brelse+0x10/0x55
May 21 11:41:35 IVRA6 kernel:  [<f8874c2a>] journal_unfile_buffer+0x4b/0x58 [jbd]
May 21 11:41:35 IVRA6 kernel:  [<f8876280>] journal_commit_transaction+0xaad/0x105d [jbd]
May 21 11:41:35 IVRA6 kernel:  [<c0106577>] do_IRQ+0x57/0x89
May 21 11:41:35 IVRA6 kernel:  [<c0106577>] do_IRQ+0x57/0x89
May 21 11:41:35 IVRA6 kernel:  [<c0104a2e>] common_interrupt+0x1a/0x20
May 21 11:41:35 IVRA6 kernel:  [<f8878755>] kjournald+0xbf/0x22f [jbd]
May 21 11:41:35 IVRA6 kernel:  [<c01345f3>] autoremove_wake_function+0x0/0x37
May 21 11:41:35 IVRA6 kernel:  [<c01345f3>] autoremove_wake_function+0x0/0x37
May 21 11:41:35 IVRA6 kernel:  [<c011c0d5>] schedule_tail+0x31/0x87
May 21 11:41:35 IVRA6 kernel:  [<f8878690>] commit_timeout+0x0/0x5 [jbd]
May 21 11:41:35 IVRA6 kernel:  [<f8878696>] kjournald+0x0/0x22f [jbd]
May 21 11:41:35 IVRA6 kernel:  [<c01023d1>] kernel_thread_helper+0x5/0xb
May 21 11:41:35 IVRA6 kernel: handlers:
May 21 11:41:35 IVRA6 kernel: [<f8b1c3e8>] (t4_interrupt_gen2+0x0/0x60f7 [wct4xxp])
May 21 11:41:35 IVRA6 kernel: Disabling IRQ ASTERISK-214

By: Tzafrir Cohen (tzafrir) 2007-05-23 20:21:48

This is indeed a bug in wct4xxp .

ztcfg -s is generally needed for dynamic spans (e.g: for tdmoe) and aparantly not for any other driver, but it should not panic.

By: Russell Bryant (russell) 2007-06-07 12:03:31

This should already be fixed in the latest code in svn.  Please reopen if you have any further issues.  Thanks