Hi,

I've got a libev based application that is crashing on solaris from inside 
libev about once every 4-days using the port backend (almost like clock work). 
The same application runs just fine on other platforms. In fact, using the 
poll() backend, it runs just fine on solaris too. With this particular 
application, the poll backend is fine as we have very few file handles. 
However, we have a larger application where port would be much preferred. So 
eventually it would be nice to resolve this.

It seems like a Solaris bug/issue to me, but it could be my code or libev.

We're running libev 3.7 on a SunOS -s 5.10 Generic_120011-14 sun4u sparc 
SUNW,Sun-Fire-480R.

abort() is being called from within ev_syserr. I think optimization is on so 
some routines are hidden, but I believe ev_syserr() is being called from 
port_poll. It looks like port_getn() is returning -1, but errno is not being 
set. gdb says errno is 0. Seems unlikely according to the port_getn() man page, 
but this is what gdb reports:

fd = 0
res = -1
i = 0
ts = {tv_sec = 1, tv_nsec = 0}
errno = 0
loop = {ev_rt_now = 1260880499.7288194, now_floor = 22712836.865228999, mn_now 
= 22712836.868827399, rtmn_diff = 1238167662.859992, 
  io_blocktime = 0, timeout_blocktime = 0, backend = 32, activecnt = 2, 
loop_done = 128 '\200', backend_fd = 16, 
  backend_fudge = 0.001, backend_modify = 0x2329c8 <port_modify>, backend_poll 
= 0x2324f0 <port_poll>, anfds = 0x73dcc0, 
  anfdmax = 32, pendings = {0x0, 0x0, 0x0, 0x5e9750, 0x0}, pendingmax = {0, 0, 
0, 2, 0}, pendingcnt = {0, 0, 0, 0, 0}, 
  pending_w = {active = 0, pending = 0, priority = 0, data = 0x0, cb = 0x22d424 
<pendingcb>}, rfeeds = 0x0, rfeedmax = 0, 
  rfeedcnt = 0, evpipe = {0, 0}, pipe_w = {active = 0, pending = 0, priority = 
2, data = 0x0, cb = 0x22d838 <pipecb>, next = 0x0, 
    fd = 0, events = 0}, curpid = 0, postfork = 0 '\0', vec_ri = 0x0, vec_ro = 
0x0, vec_wi = 0x0, vec_wo = 0x0, vec_max = 0, 
  polls = 0x0, pollmax = 0, pollcnt = 0, pollidxs = 0x0, pollidxmax = 0, 
port_events = 0x7474d0, port_eventmax = 64, 
  fdchanges = 0x70ee18, fdchangemax = 2, fdchangecnt = 0, timers = 0x7478d8, 
timermax = 4, timercnt = 1, periodics = 0x0, 
  periodicmax = 0, periodiccnt = 0, idles = {0x0, 0x0, 0x0, 0x0, 0x0}, idlemax 
= {0, 0, 0, 0, 0}, idlecnt = {0, 0, 0, 0, 0}, 
  idleall = 0, prepares = 0x0, preparemax = 0, preparecnt = 0, checks = 0x0, 
checkmax = 0, checkcnt = 0, forks = 0x0, forkmax = 0, 
  forkcnt = 0, gotasync = 0, asyncs = 0x0, asyncmax = 0, asynccnt = 0, 
loop_count = 2, loop_depth = 1, userdata = 0x0, 
  release_cb = 0, acquire_cb = 0, invoke_cb = 0x22f0e8 <ev_invoke_pending>}
(gdb) p loop->port_events[0]
$20 = {portev_events = 4, portev_source = 4, portev_pad = 43456, portev_object 
= 17, portev_user = 0x0}
(gdb) p loop->port_events[1]
$21 = {portev_events = 7401968, portev_source = 0, portev_pad = 0, 
portev_object = 0, portev_user = 0x0}
(gdb) p loop->port_events[2]
$22 = {portev_events = 0, portev_source = 0, portev_pad = 0, portev_object = 0, 
portev_user = 0x0}

I don't know port_getn(), but if anybody has suggestions, please let me know.

Thanks,
Eric


_______________________________________________
libev mailing list
libev@lists.schmorp.de
http://lists.schmorp.de/cgi-bin/mailman/listinfo/libev

Reply via email to