Closed Bug 791617 Opened 14 years ago Closed 12 years ago

Race condition at startup prevents remote debugger from starting up on Fennec

Categories

(DevTools :: Debugger, defect, P2)

14 Branch
defect

Tracking

(Not tracked)

RESOLVED WORKSFORME

People

(Reporter: glandium, Assigned: past)

Details

When devtools.debugger.remote-enabled is set to true, sometimes, the remote debug server listens on port 6000 and sometimes not. From some debugging of the situation, it looks like the socket transport service is not completely initialized at the moment it is called to listen on the port.
(In reply to Mike Hommey [:glandium] from comment #0) > When devtools.debugger.remote-enabled is set to true, sometimes, the remote > debug server listens on port 6000 and sometimes not. > > From some debugging of the situation, it looks like the socket transport > service is not completely initialized at the moment it is called to listen > on the port. I can't reproduce this. Do you have any specific STR? Do you get any errors in the log or the error console? DH_checkInit should throw if the transport is not initialized.
Unfortunately, as it's a race condition, it happens randomly and at the moment, i can't reproduce, while it happened quite reliably last week. IIRC, the failure happens on the asyncListen call, with an xpconnect error, and it leads to a "Could not start debugging listener on port 6000" message.
Hm, I wonder if port 6000 is already taken when that happens. Although from my reading of the code this should happen during the ServerSocket constructor call, but that is also inside the same try/catch.
Assignee: nobody → past
Priority: -- → P2
I haven't seen this happen lately and I know ochameau fixed some related bugs in that part of the code, so I'm going to close this bug. Feel free to reopen if it ever occurs again.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → WORKSFORME
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.