Arch Linux

Please read this before reporting a bug:

Do NOT report bugs when a package is just outdated, or it is in Unsupported. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!

FS#10445 - bluez: dund starts before sdp service finish initialization

Attached to Project: Arch Linux
Opened by Sergej Pupykin (sergej) - Sunday, 18 May 2008, 21:25 GMT
Last edited by Jan de Groot (JGC) - Saturday, 02 May 2009, 15:28 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Thomas Bächler (brain0)
Geoffroy Carrier (gcarrier)
Architecture All
Severity Medium
Priority Normal
Reported Version 2007.08-2
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No


dund starts before sdp service finish initialization.
>> May 19 01:15:32 home dund[6745]: Failed to connect to the local SDP server. Connection refused(111)
appears in everything.log

Additional info:
bluez-libs 3.31-1
bluez-utils 3.31-1

Steps to reproduce:
Start bluetooth with hcid and dund.

This problem can be resolved by adding 'sleep 1' into /etc/rc.d/bluetooth between hcid and dund start.
This task depends upon

Closed by  Jan de Groot (JGC)
Saturday, 02 May 2009, 15:28 GMT
Reason for closing:  Fixed
Additional comments about closing:  Added a sleep 1 for now. Launching netstat in a loop doesn't look like the correct solution to me.
This daemon has braindead initialization code, it forks before initializing and doesn't cleanup the socket when it's killed.
Comment by Thomas Bächler (brain0) - Monday, 19 May 2008, 10:05 GMT
I would hate to have to sleep inside an init script. Isn't there a way to make hcid return _after_ the initialization of sdp?
Comment by Sergej Pupykin (sergej) - Monday, 19 May 2008, 16:35 GMT
You may use following construction as an example in rc-script

while [ `netstat -xln| grep /var/run/sdp | wc -l` -eq 0 ]; do
sleep 1;

When sdp started, /var/run/sdp socket appears in netstat -xln output.
Comment by Leonardo Ferreira Fontenelle (leonardof) - Friday, 05 September 2008, 04:00 GMT
This bug is affecting me too; I can't get PAN working.
Comment by Leonardo Ferreira Fontenelle (leonardof) - Tuesday, 04 November 2008, 00:35 GMT
I just used this fix to enable DUN in the init script. Without this hack, I could only call dund from the command line.