Bug 24724 - everybuddy fails if socket already exists
Summary: everybuddy fails if socket already exists
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: Normal Affects Only Me
Assignee: Jim Mock
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-01-29 20:00 UTC by Vivek Khera
Modified: 2001-01-30 16:06 UTC (History)
1 user (show)

See Also:


Attachments
file.diff (396 bytes, patch)
2001-01-29 20:00 UTC, Vivek Khera
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vivek Khera 2001-01-29 20:00:01 UTC
you can't run everybuddy 0.2.0 more than once, since the file
~/.everybuddy/eb_socke doesn't get removed, and the second time you
try to run the program, it fails with the cryptic "bind: Address
already in use".  Using ktrace, it is evident that the eb_socke file
is the culprit.

Fix: Make everybuddy delete the socket file prior to creating it on the
next run... it looks like it is trying to do so, around line 280 of
src/main.c, but it seems to fail since the file name is somehow
truncated in the bind call, as ktrace shows:

 15426 everybuddy RET   fcntl 0
 15426 everybuddy CALL  unlink(0xbfbff8aa)
 15426 everybuddy NAMI  "/home/khera/.everybuddy/eb_socket"
 15426 everybuddy RET   unlink -1 errno 2 No such file or directory
 15426 everybuddy CALL  bind(0x6,0xbfbff8a8,0x22)
 15426 everybuddy NAMI  "/home/khera/.everybuddy/eb_socke"
 15426 everybuddy RET   bind -1 errno 48 Address already in use

My guess is that this patch needs to be applied.  Classic off-by-one
error.  It works for me (tm).  Now the socket is named eb_socket like
it seems it was intended.
How-To-Repeat: 
run everybuddy, exit, run again.  (sounds suspiciously like "lather,
rinse, repeat" doesn't it? ;-)
Comment 1 Chris D.Faulhaber freebsd_committer freebsd_triage 2001-01-30 15:15:37 UTC
Responsible Changed
From-To: gnats-admin->jim

Over to maintainer
Comment 2 Jim Mock freebsd_committer freebsd_triage 2001-01-30 16:06:38 UTC
State Changed
From-To: open->closed

Committed, thanks!