2009-07-31 06:36:27

by John Freeman

[permalink] [raw]
Subject: Re: Intermittent "Address already in use" error

John Freeman wrote:
> Brad Midgley wrote:
>>> Can anyone suggest where I should start looking?
>> Are you using a recent kernel and bluez?
>
> Very recent:
> Kernel 2.6.29.5-84.fc10.i686
> bluez-4.30-2.fc10.i386
>
> > Do you have example code that
> > will cause the problem? Even better if it is in script like python.

[Red face mode]
Now I know the superficial cause of the problem. The program ran hcidump:
subprocess.Popen(['hcidump', '-i', adapterId, '-w', fname])
in order to gather info on some other problems. Under some circumstances it
didn't clean up the process before terminating.

Killing the hcidump cleaned up the files in /sys/class/bluetooth and I no longer
get the error.

If anyone can explain why, I'd be very interested.