connect to server - crash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]


I just created a test program, which creates a socket and tries to
connect to server port. But no server process is created. In this case
the connection fails. If I run this code in a loop, after some time I
am getting crash (attached below). I belive there must be some patch
to fix this issue. can anyone let me know the link of it?

I am running this on my embedded PXA255 target and linux kernel
version is 2.6.26.

sock_fd = socket(AF_INET, SOCK_STREAM, 0);

serv_addr.sin_family		= AF_INET;
serv_addr.sin_addr.s_addr	= htonl(0x7F000001);
serv_addr.sin_port		= htons(41001);

for (;;)
err = connect(sock_fd, (struct sockaddr *)&serv_addr, sizeof(serv_addr));

if (err == -1 && errno != EINPROGRESS)
	fprintf(stderr, "Connect failed\n");
	return -1;

unable to cInternal error: Oops: f3 [#1]
Modules linked in:
CPU: 0    Not tainted  ( #9)
PC is at __inet_lookup_established+0x19c/0x1ec
LR is at 0xbcc6211d
pc : [<c027d724>]    lr : [<bcc6211d>]    psr: 20000013
sp : c7123b58  ip : bcc79adb  fp : c7123b7c
r10: 00000001  r9 : c71118d4  r8 : 0100007f
r7 : c04457e4  r6 : 0100007f  r5 : a029a6a3  r4 : 000008e8
r3 : 0000a6a3  r2 : 00000000  r1 : 00000001  r0 : c04457e4
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 0000397f  Table: a70e0000  DAC: 00000015
Process netcrash (pid: 1030, stack limit = 0xc7122260)
Stack: (0xc7123b58 to 0xc7124000)
3b40:                                                       c0407050 c7ee3818
3b60: 0000a029 c71118e8 0100007f 00000001 c7123bb4 c7123b80 c02915c0 c027d594
3b80: 0100007f 0000a029 00000001 c0407050 c7ee3818 c0446144 c7ee3838 c0445aa0
3ba0: c7ee3838 0000405c c7123bcc c7123bb8 c0276990 c02913c8 c71118d4 c7ee3818
3bc0: c7123c04 c7123bd0 c027684c c02768a0 00000000 c7123c54 c03ee4d8 001200d2
3be0: c7123c3c c7ee3818 c0445a88 c7c17800 00000008 c0445aa0 c7123c30 c7123c08
3c00: c025fc68 c0276394 00000000 c03edd18 c7c17800 c04458ec 00000000 00000040
3c20: 0000405c c7123c54 c7123c34 c025fd2c c025fa2c c04458ec 00000040 0000000a
3c40: 00000000 0000012c c7123c7c c7123c58 c025c630 c025fca8 00000001 c042c080
3c60: 0000000a 00000000 c7d4f710 00000000 c7123c98 c7123c80 c0047204 c025c5a4
3c80: 60000013 c7ee3818 00000000 c7123cac c7123c9c c004730c c00471b4 c042c060
3ca0: c7123cc0 c7123cb0 c00474d4 c00472d0 c7c17800 c7123ce4 c7123cc4 c025f9e0
3cc0: c004746c c7ee3818 c7d4f700 0000000e 00000000 c7d4f710 c7123d08 c7123ce8
3ce0: c027b578 c025f7b8 c7ee3818 c70f4cc0 00000000 c7ee3818 c7ee3818 c7123d18
3d00: c7123d0c c027b61c c027b37c c7123d2c c7123d1c c027a1ac c027b5d8 c71118d4
3d20: c7123d98 c7123d30 c027b320 c027a188 c7123d68 c7123d40 c005ac34 c7ee3780
3d40: 000000d0 c7ee3780 0000a6a3 c7ee3838 c7ee3818 c02565a0 c7ee3818 c7ee3780
3d60: c7123d84 c7123d70 c02566b8 0100007f c7d3dd00 c70f4cc0 00000001 c71118e8
3d80: c7ee3818 00000028 00000007 c7123de0 c7123d9c c028b968 c027b084 00000002
3da0: 00000002 0000405c 00000000 00000000 c7123dbc c0255b5c c70f4cc0 c7ee3780
3dc0: 00000000 c03ea090 0000a6a3 c70f4cc0 0100007f c7123e0c c7123de4 c028d92c
3de0: c028b22c 00000001 c7123def 02c3f68d c7d3dd00 c7123e20 00000000 000029a0
3e00: c7123e88 c7123e10 c028fcfc c028d6a4 00000000 c7123ecc 0100007f 00000000
3e20: 00000000 00000000 00000000 0100007f 0100007f 00000000 00000000 00000000
3e40: 00000000 00000000 00000000 00000000 00000006 29a0a6a3 00000000 c7d3dd00
3e60: c7123ecc c70f4cc0 00000010 c7123ecc c782c2c0 00000002 40128000 c7123ec8
3e80: c7123e8c c029c4a4 c028f95c c016ed8c ffa06e3f 00000010 c7123ecc c0027ca4
3ea0: bea06e30 c782c2c0 00000010 c7123ecc c0027ca4 c7122000 40128000 c7123f70
3ec0: c7123ecc c0251230 c029c3fc 29a00002 0100007f 00000000 00000000 c7123ee8
3ee0: c003d384 c003d2e4 00000000 c7e1cc10 c7123f14 c7123f00 c01534c0 c003d364
3f00: c780fbf8 00000009 c7123f58 c7123f18 c0155150 c0153468 c7d4fe80 c015801c
3f20: 00000009 00000000 00000000 c780fcf4 00000002 c780ee0c c780fbf8 00000009
3f40: c0027ca4 c7122000 40128000 00000000 00000000 00000003 00008894 000088ec
3f60: 00000066 c7123fa4 c7123f74 c0252664 c02511c4 c7123f80 c008e8d4 00000003
3f80: bea06e30 00000010 00000000 00000009 bea048e0 bea06ea4 00000000 c7123fa8
3fa0: c0027b00 c0252570 bea06ea4 00008894 00000003 bea06e1c 00000010 000036d8
3fc0: bea06ea4 00008894 000088ec 00000001 000087b4 00000000 40128000 bea06e50
3fe0: 00000000 bea06e1c 00008748 400d5988 60000010 00000003 00000000 00000000
[<c027d588>] (__inet_lookup_established+0x0/0x1ec) from [<c02915c0>]
[<c02913bc>] (tcp_v4_rcv+0x0/0x6b0) from [<c0276990>]
[<c0276894>] (ip_local_deliver+0x0/0x1d0) from [<c027684c>] (ip_rcv+0x4c4/0x50c)
 r5:c7ee3818 r4:c71118d4
[<c0276388>] (ip_rcv+0x0/0x50c) from [<c025fc68>]
 r8:c0445aa0 r7:00000008 r6:c7c17800 r5:c0445a88 r4:c7ee3818
[<c025fa20>] (netif_receive_skb+0x0/0x27c) from [<c025fd2c>]
 r8:0000405c r7:00000040 r6:00000000 r5:c04458ec r4:c7c17800
[<c025fc9c>] (process_backlog+0x0/0x158) from [<c025c630>]
 r8:0000012c r7:00000000 r6:0000000a r5:00000040 r4:c04458ec
[<c025c598>] (net_rx_action+0x0/0x1c0) from [<c0047204>]
[<c00471a8>] (__do_softirq+0x0/0xd0) from [<c004730c>] (do_softirq+0x48/0x64)
 r6:00000000 r5:c7ee3818 r4:60000013
[<c00472c4>] (do_softirq+0x0/0x64) from [<c00474d4>] (local_bh_enable+0x74/0x98)
[<c0047460>] (local_bh_enable+0x0/0x98) from [<c025f9e0>]
[<c025f7ac>] (dev_queue_xmit+0x0/0x274) from [<c027b578>]
 r8:c7d4f710 r7:00000000 r6:0000000e r5:c7d4f700 r4:c7ee3818
[<c027b370>] (ip_finish_output+0x0/0x25c) from [<c027b61c>]
 r8:c7ee3818 r7:c7ee3818 r6:00000000 r5:c70f4cc0 r4:c7ee3818
[<c027b5cc>] (ip_output+0x0/0x58) from [<c027a1ac>] (ip_local_out+0x30/0x3c)
[<c027a17c>] (ip_local_out+0x0/0x3c) from [<c027b320>]
[<c027b078>] (ip_queue_xmit+0x0/0x2f8) from [<c028b968>]
[<c028b220>] (tcp_transmit_skb+0x0/0x7ac) from [<c028d92c>]
[<c028d698>] (tcp_connect+0x0/0x330) from [<c028fcfc>]
 r7:000029a0 r6:00000000 r5:c7123e20 r4:c7d3dd00
[<c028f950>] (tcp_v4_connect+0x0/0x420) from [<c029c4a4>]
[<c029c3f0>] (inet_stream_connect+0x0/0x270) from [<c0251230>]
[<c02511b8>] (sys_connect+0x0/0x9c) from [<c0252664>]
 r7:00000066 r6:000088ec r5:00008894 r4:00000003
[<c0252564>] (sys_socketcall+0x0/0x1e8) from [<c0027b00>]
Code: 0a00000b e1a01002 e3510000 0a000006 (e5912000)
Kernel panic - not syncing: Fatal exception in interrupt
To unsubscribe from this list: send the line "unsubscribe linux-net" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at

[Netdev]     [Ethernet Bridging]     [Linux 802.1Q VLAN]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Git]     [Bugtraq]     [Photo]     [Yosemite]     [Yosemite News and Information]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux PCI]     [Linux Admin]     [Samba]     [Video 4 Linux]     [Linux Resources]

Add to Google