[asterisk-dev] parse error in dahdi_cfg?

David A. Bandel david.bandel at gmail.com
Tue Aug 26 14:48:50 CDT 2008


On Tue, Aug 26, 2008 at 10:13 AM, Tzafrir Cohen
<tzafrir.cohen at xorcom.com> wrote:
> On Mon, Aug 25, 2008 at 04:11:55PM -0500, David A. Bandel wrote:
>> On Mon, Aug 25, 2008 at 1:45 PM, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:
>> > On Mon, Aug 25, 2008 at 01:25:28PM -0500, David A. Bandel wrote:
>> >
>> >> FYI: the dahdi_genconf still does not work.  echo_can not selected
>> >> from /etc/dahdi/genconf_parameters and wctdm card seen from
>> >> dahdi_genconf but modules not seen.
>> >
>> > This seems to be because the path to dahdi_cfg is incorrect .
>> >
>> > Can you try:
>> >
>> >  DAHDI_CFG=/usr/sbin/dahdi_cfg dahdi_genconf
>>
>> well that produced some interesting results:
>> root at guaca:/etc/dahdi# DAHDI_CFG=/usr/sbin/dahdi_cfg dahdi_genconf
>> sh: line 1: 15129 Done                    echo fxsks=2
>>      15130 Segmentation fault      | /usr/sbin/dahdi_cfg -c /dev/fd/0 > /dev/nu
>> l 2>&1
>> sh: line 1: 15135 Done                    echo fxsks=3
>>      15136 Segmentation fault      | /usr/sbin/dahdi_cfg -c /dev/fd/0 > /dev/nu
>> l 2>&1
>> sh: line 1: 15141 Done                    echo fxsks=4
>>      15142 Segmentation fault      | /usr/sbin/dahdi_cfg -c /dev/fd/0 > /dev/nu
>> l 2>&1
>> root at guaca:/etc/dahdi# cat system.conf
>> # Autogenerated by /usr/sbin/dahdi_genconf on Mon Aug 25 16:09:11 2008 -- do no
>
> The segfaulting command is basically:
>
>  dahdi_cfg -c <(echo fxsks=2)
>
> Does the above segfault?

Yep:
root at guaca:/etc/dahdi# dahdi_cfg -c <(echo fxsks=2)
Segmentation fault
root at guaca:/etc/dahdi# dahdi_cfg -c <(echo fxsls=2)
Segmentation fault

>
> Do you see anything in the kernel logs?

How about a kernel oops?

[12122.012113] BUG: unable to handle kernel NULL pointer dereference at 0000002c
[12122.020471] IP: [<d80a79cb>] :dahdi:dahdi_common_ioctl+0x232/0xb26
[12122.024549] *pde = 00000000
[12122.028501] Oops: 0000 [#27] SMP
[12122.032456] Modules linked in: dahdi_echocan_mg2 wctdm wcfxo dahdi
firmware_class tcp_diag inet_diag rfcomm l2cap video output ac battery
nfsd auth_rpcgss exportfs nfs lockd nfs_acl sunrpc ipv6 ext3 jbd
mbcache dm_snapshot dm_mirror dm_mod loop hci_usb bluetooth evdev
rtc_cmos rtc_core psmouse rtc_lib parport_pc parport serio_raw
snd_via82xx pcspkr gameport snd_ac97_codec ac97_bus snd_pcm snd_timer
snd_page_alloc snd_mpu401_uart button snd_rawmidi snd_seq_device
i2c_viapro hisax snd i2c_core soundcore isdn via_ircc via_agp irda
slhc agpgart crc_ccitt shpchp pci_hotplug xfs raid1 md_mod ide_cd_mod
cdrom ide_disk ata_generic libata scsi_mod dock uhci_hcd via82cxxx
ide_pci_generic via_rhine mii usbcore ide_core thermal processor fan
[last unloaded: dahdi]
[12122.032456]
[12122.032456] Pid: 13073, comm: dahdi_cfg Tainted: G      D  (2.6.25-2-686 #1)
[12122.032456] EIP: 0060:[<d80a79cb>] EFLAGS: 00010202 CPU: 0
[12122.032456] EIP is at dahdi_common_ioctl+0x232/0xb26 [dahdi]
[12122.032456] EAX: 00000000 EBX: d5128b74 ECX: 00000000 EDX: ffffff01
[12122.032456] ESI: 00000001 EDI: 00000000 EBP: bf94fd48 ESP: d632d934
[12122.032456]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
[12122.032456] Process dahdi_cfg (pid: 13073, ti=d632c000
task=d62b3310 task.ti=d632c000)
[12122.032456] Stack: 00000002 00000000 00000000 00002001 00000000
00000000 ffffffff ffffffff
[12122.032456]        00000000 00000004 00000000 00000000 00000000
00000000 00000000 00000000
[12122.032456]        00000000 00000000 00000000 00000000 00000000
00000000 00000032 00000032
[12122.032456] Call Trace:
[12122.032456]  [<d7cb1192>] xfs_alloc_update+0x3a/0xb5 [xfs]
[12122.032456]  [<d7cbccfb>] xfs_bmap_add_extent_delay_real+0x700/0x1365 [xfs]
[12122.032456]  [<d7cee350>] xfs_trans_brelse+0x27/0xa7 [xfs]
[12122.032456]  [<d7cc685d>] xfs_btree_setbuf+0x18/0x7b [xfs]
[12122.032456]  [<d7caf131>] xfs_alloc_search_busy+0x20/0x9e [xfs]
[12122.032456]  [<c0135eaa>] enqueue_hrtimer+0xc9/0xd4
[12122.032456]  [<c0136437>] hrtimer_start+0xf7/0x110
[12122.032456]  [<c012002b>] hrtick_set+0x8f/0xd8
[12122.032456]  [<c02b4302>] schedule+0x5b7/0x5e9
[12122.032456]  [<c012b787>] lock_timer_base+0x19/0x35
[12122.032456]  [<d80ae307>] dahdi_ioctl+0x13a5/0x15ed [dahdi]
[12122.032456]  [<c0133b3e>] remove_wait_queue+0xc/0x34
[12122.032456]  [<c017fefe>] free_poll_entry+0xe/0x16
[12122.032456]  [<c017ff1e>] poll_freewait+0x18/0x4c
[12122.032456]  [<c018061a>] do_select+0x39a/0x3b7
[12122.032456]  [<d7cd90bb>] xfs_iext_bno_to_ext+0xd8/0x191 [xfs]
[12122.032456]  [<c015c911>] get_page_from_freelist+0x8c/0x37b
[12122.032456]  [<c015cd80>] __alloc_pages+0x5f/0x2cb
[12122.032456]  [<c0158705>] find_lock_page+0x19/0x7f
[12122.032456]  [<c0158705>] find_lock_page+0x19/0x7f
[12122.032456]  [<c015a838>] find_or_create_page+0x1c/0x90
[12122.032456]  [<d7cf827d>] _xfs_buf_lookup_pages+0x256/0x27d [xfs]
[12122.032456]  [<c01a118c>] proc_alloc_inode+0x39/0x55
[12122.032456]  [<c01b9174>] security_inode_alloc+0x16/0x17
[12122.032456]  [<c0185628>] alloc_inode+0x12e/0x186
[12122.032456]  [<c0197eeb>] inotify_d_instantiate+0xf/0x31
[12122.032456]  [<c01b93a5>] security_task_to_inode+0xc/0xd
[12122.032456]  [<c01a2637>] pid_revalidate+0x5a/0xc3
[12122.032456]  [<c01a278a>] proc_pid_instantiate+0x6d/0x7d
[12122.032456]  [<c01a3d64>] proc_pid_lookup+0xb7/0xd4
[12122.032456]  [<c017bac0>] do_lookup+0x53/0x145
[12122.032456]  [<c011a178>] kunmap_atomic+0x67/0x87
[12122.032456]  [<c015cb83>] get_page_from_freelist+0x2fe/0x37b
[12122.032456]  [<c015cd80>] __alloc_pages+0x5f/0x2cb
[12122.032456]  [<c0165468>] handle_mm_fault+0x24b/0x6bb
[12122.032456]  [<c01a1cc3>] task_dumpable+0x1f/0x32
[12122.032456]  [<c01a307a>] proc_fd_instantiate+0xcc/0xf3
[12122.032456]  [<c01a23a1>] proc_lookupfd_common+0x40/0x5e
[12122.032456]  [<c01a2fae>] proc_fd_instantiate+0x0/0xf3
[12122.032456]  [<c01a257e>] proc_fd_info+0xa6/0xc0
[12122.032456]  [<c0118b4c>] do_page_fault+0x268/0x584
[12122.032456]  [<c0158705>] find_lock_page+0x19/0x7f
[12122.032456]  [<c015a5e3>] filemap_fault+0x1ff/0x36d
[12122.032456]  [<c011a178>] kunmap_atomic+0x67/0x87
[12122.032456]  [<c017b3ea>] pipe_read+0x2d1/0x329
[12122.032456]  [<c0175852>] do_sync_read+0xbf/0xfe
[12122.032456]  [<c01339f0>] autoremove_wake_function+0x0/0x2d
[12122.032456]  [<c017f7af>] vfs_ioctl+0x47/0x5d
[12122.032456]  [<c017fa0a>] do_vfs_ioctl+0x245/0x258
[12122.032456]  [<c017fa5e>] sys_ioctl+0x41/0x5b
[12122.032456]  [<c01077e8>] sysenter_past_esp+0x6d/0xa5
[12122.032456]  [<c02b0000>] init_amd+0x312/0x66e
[12122.032456]  =======================
[12122.032456] Code: 00 00 89 44 24 70 8b 83 48 08 00 00 89 44 24 74
8b 43 2c 89 04 24 8b 83 c4 00 00 00 89 84 24 84 00 00 00 74 0f 8b 83
80 00 00 00 <8b> 40 2c c1 e0 10 09 04 24 8b 83 50 08 00 00 89 44 24 7c
8b 83
[12122.032456] EIP: [<d80a79cb>] dahdi_common_ioctl+0x232/0xb26
[dahdi] SS:ESP 0068:d632d934
[12122.032767] ---[ end trace 60f8ba1c980e31d5 ]---



>

This am (before this message) I killed /etc/dahdi and all the
dahdi-related binaries I could find.  co'd the latest dahdi and
dahdi-tools (r-4844) built and installed them, then started from
square 1.

dahdi_genconf (after "fixing" genconf_parameters which wasn't
installed in /etc/dahdi):
root at guaca:~/dahdi-tools# dahdi_
dahdi_cfg           dahdi_genconf       dahdi_monitor       dahdi_scan
         dahdi_test
dahdi_diag          dahdi_hardware      dahdi_registration
dahdi_speed         dahdi_tool
root at guaca:~/dahdi-tools# dahdi_genconf
sh: line 1: 12992 Done                    echo fxsks=2
     12993 Segmentation fault      | /usr/sbin/dahdi_cfg -c /dev/fd/0
> /dev/null 2>&1
sh: line 1: 12998 Done                    echo fxsks=3
     12999 Segmentation fault      | /usr/sbin/dahdi_cfg -c /dev/fd/0
> /dev/null 2>&1
sh: line 1: 13004 Done                    echo fxsks=4
     13005 Segmentation fault      | /usr/sbin/dahdi_cfg -c /dev/fd/0
> /dev/null 2>&1

(see also kernel oops above)


Fixed /etc/dahdi/system.conf as only fxols=1 showed up (fxsls=2 segfaulted ^^).

Also retested after fixing /etc/dahdi/modules

Note: perhaps /etc/dahdi/modules should have all modules commented out
by default.  Default now is to load a pile of extraneous modules that
seem to exacerbate the problems.  Until I had all the cruft out,
things were really bad (basically dahdi didn't work at all and the
kernel logs were full of kernel oops).  This will not encourage most
users.

guaca*CLI> dahdi show status
Description                              Alarms  IRQ    bpviol CRC4
Fra Codi Options  LBO
Wildcard TDM400P REV I Board 5           OK      0      0      0
CAS Unk  YEL      0 db (CSU)/0-133 feet (DSX-1)
guaca*CLI> dahdi show channels
   Chan Extension  Context         Language   MOH Interpret
Blocked    State
 pseudo            default                    default
       In Service
      1            default                    default
       In Service
      2            default                    default
       In Service

line build-out is meaningless for analog cards, but condition YELLOW?

Let me know when you think you've isolated and fixed this so I can
test again.  Also let me know what else you need from me (besides
testing an E-1 card). ;-)

David A. Bandel
-- 
Focus on the dream, not the competition.
 - Nemesis Air Racing Team motto



More information about the asterisk-dev mailing list