On Sun, Sep 12, 2010 at 11:26 +0600, Anton Maksimenkov wrote: > Hello. > I use my OBSD machine to test some server on another machine. They are > connected by pathcord, 1Gbit network cards are used. > Test program (uses kqueue) do many (I want thousands) connections to > server. Write query, read answer. > And it tries to keep that much connections by doing as much new > connections as needed. > > When number of connections kept below 100 - all ok. But if I raise > them (upto about 500-1000) the program start these connections, do > some write/read (show about 10-20 successful reads) and the kernel > hangs. 1-2 sec after start. > Tweaks - kern.maxfiles=16384 and openfiles-cur/max=8192 for my user. > > Info from ddb (see dmesg below): > > ddb> show panic > the kernel did not panic > > ddb> trace > Debugger(0,3f8,0,0,1) at Debugger+0x4 > comintr(d1571000) at comintr+0x287 > Xrecurse_legacy4() at Xrecurse_legacy4+0xb3 > --- interrupt --- > pool_do_get(d0a10b60,0,0,0,60) at pool_do_get+0x2c2 > pool_get(d0a10b60,0,80000000,0,0) at pool_get+0x54 > m_gethdr(1,1,80000000,369e99,0) at m_gethdr+0x39 > m_clget(0,1,d1526054,800,d03e1aeb) at m_clget+0x10a > re_newbuf(d1526000,10,d999eb48,d02b30cc,d1526000) at re_newbuf+0x35 > re_rx_list_fill(d1526000,20,60,58,d1520010) at re_rx_list_fill+0x21 > re_rxeof(d1526000,d9799800,3e,10,10) at re_rxeof+0x37c > re_intr(d1526000) at re_intr+0x12a > Xrecurse_legacy11() at Xrecurse_legacy11+0xb7 > --- interrupt --- > filt_soread(d9a5bdc0,0,0,d9a5bd98,d9a5bd98) at filt_soread+0x1 > selwakeup(d9a5bdbc,d9b08300,d9b08200,d9b08300,d9a5bd98) at selwakeup+0x22 > sowakeup(d9a5bd4c,d9a5bd98,14,d999ed24,1) at sowakeup+0x1d > tcp_input(d9b08300,14,0,0,6) at tcp_input+0x26ac > ipv4_input(d9b08300,0,d999ede8,d0202089,d03d0058) at ipv4_input+0x42a > ipintr(d03d0058,d09e0010,10,d5d10010,d09e72c0) at ipintr+0x49 > Bad frame pointer: 0xd999ede8 >
there's a forgotten splx in the driver. that explains why system appears to be hung. OK? Index: re.c =================================================================== RCS file: /home/cvs/src/sys/dev/ic/re.c,v retrieving revision 1.128 diff -u -p -u -p -r1.128 re.c --- re.c 27 Aug 2010 17:08:00 -0000 1.128 +++ re.c 5 Oct 2010 08:27:05 -0000 @@ -2042,8 +2042,10 @@ re_init(struct ifnet *ifp) if (sc->sc_hwrev != RL_HWREV_8139CPLUS) CSR_WRITE_2(sc, RL_MAXRXPKTLEN, 16383); - if (sc->rl_testmode) + if (sc->rl_testmode) { + splx(s); return (0); + } mii_mediachg(&sc->sc_mii);