Problem/error With DAHDI Tools 2.9.0.1

Home » Asterisk Users » Problem/error With DAHDI Tools 2.9.0.1
Asterisk Users 9 Comments

Hello,

Getting this error on dahdi_cfg. Reverting to 2.8 the error goes away:

*line 15: Unable to create ‘dahdi_cfg’ mutex.*

Is this a problem?

Thanks in advance.

Full detail:

[ebox]> dahdi_cfg -vvvvvvv DAHDI Tools Version – 2.9.0.1

DAHDI Version: 2.9.0
Echo Canceller(s): HWEC
Configuration
=====================
SPAN 1: CCS/ AMI Build-out: 0 db (CSU)/0-133 feet (DSX-1)
SPAN 2: CCS/ AMI Build-out: 0 db (CSU)/0-133 feet (DSX-1)
SPAN 3: CCS/ AMI Build-out: 0 db (CSU)/0-133 feet (DSX-1)
SPAN 4: CCS/ AMI Build-out: 0 db (CSU)/0-133 feet (DSX-1)

Channel map:

Channel 01: Clear channel (Default) (Echo Canceler: kb1) (Slaves: 01)
Channel 02: Clear channel (Default) (Echo Canceler: kb1) (Slaves: 02)
Channel 03: Hardware assisted D-channel (Default) (Echo Canceler: kb1)
(Slaves: 03)
Channel 04: Clear channel (Default) (Echo Canceler: kb1) (Slaves: 04)
Channel 05: Clear channel (Default) (Echo Canceler: kb1) (Slaves: 05)
Channel 06: Hardware assisted D-channel (Default) (Echo Canceler: kb1)
(Slaves: 06)
Channel 07: Clear channel (Default) (Echo Canceler: kb1) (Slaves: 07)
Channel 08: Clear channel (Default) (Echo Canceler: kb1) (Slaves: 08)
Channel 09: Hardware assisted D-channel (Default) (Echo Canceler: kb1)
(Slaves: 09)
Channel 10: Clear channel (Default) (Echo Canceler: kb1) (Slaves: 10)
Channel 11: Clear channel (Default) (Echo Canceler: kb1) (Slaves: 11)
Channel 12: Hardware assisted D-channel (Default) (Echo Canceler: kb1)
(Slaves: 12)

12 channels to configure.

Notice: Configuration file is /etc/dahdi/system.conf
*line 15: Unable to create ‘dahdi_cfg’ mutex.*

9 thoughts on - Problem/error With DAHDI Tools 2.9.0.1

  • Which distro / version are you running? It appears that the sem_open call has failed on this platform.

    There does appear to be a mistake in the code though with the error reporting. ‘perror’ should be used instead of ‘error’. The line number in the config file isn’t related to this error report.

  • Hello Shaun,

    This system is a custom distro, based on debian and currently built around kernel 2.6.35.8. Is sem_open introduced only in DAHDI 2.9 ?

  • Maybe the problem is lack of tmpfs?

    statfs(“/dev/shm”, 0xbff88568) = -1 ENOENT (No such file or directory)

    Is this a new requirement for DAHDI?

  • Yes. It was added in [1] in order to prevent errors when multiple invocations of dahdi_cfg are run in parallel. I’ve updated the error messages [2] on the master branch of dahdi-tools. That might provide some more information about why sem_open is failing on this platform.

    [1] http://git.asterisk.org/gitweb/?p

  • tmpfs is not a requirement per-se, but it’s how most POSIX libraries on linux (including the one installed on your system) implement the named semaphores.

  • Well, I created /dev/shm and mounted tmpfs on it, and the problem is no more. Just creating /dev/shm was not enough.

    thanks.

  • Not really. There are other ways that dahdi_cfg could serialize itself, but POSIX semaphores are widely deployed on systems that are installing newer versions of DAHDI.

    Although, dahdi-tools should probably have a configure script test for a working implementation of sem_open and use another mechanism if it is not available.