Opened 13 years ago

Closed 10 years ago

#268 closed defect (worksforme)

Running "while true; do echo prd | nc -u localhost 8080; done" hangs HelenOS networking

Reported by: Jakub Jermář Owned by:
Priority: major Milestone: 0.6.0
Component: helenos/net/other Version:
Keywords: networking Cc:
Blocker for: Depends on:
See also:

Description

When testing UDP from outside of HelenOS (which runs in Qemu) using the following command:

while true; do echo prd | nc -u localhost 8080; done

the whole networking stack will be weged after a couple of UDP datagrams sent. Note that the netecho must be running:

# netecho -v -p 8080

Sending the UDP datagrams at a slower rate does not exhibit the problem.

Change History (9)

comment:1 by Jakub Jermář, 13 years ago

Component: net/udpnet/other

It turns out that after the hang happens, at least local IP, ICMP and UDP are still working as can be demonstrated by successfully running nettest1. What is not functional though is anything trying to use NIC (or maybe the ethernet module).

comment:2 by Jakub Jermář, 13 years ago

This was not reproducible after Martin's latest modifications of the ne2000 driver, tested on revision mainline, 788.

comment:3 by Martin Decky, 13 years ago

My implementation of netcat is unable to send single UDP packets in a loop (it does not react on EOF in the pipe and blocks). Please recheck with your netcat.

comment:4 by Jakub Jermář, 13 years ago

With my nc, and mainline revision 810, I can see some quantitative improvement (more echo pings), but after some time, dp8390 and eth tasks seem to get into a deadlocked state, waiting for each other. I will try to find out who is waiting for whom using the ipc command.

comment:5 by Jakub Jermář, 13 years ago

Milestone: 0.4.30.5.0

comment:6 by Jiri Svoboda, 12 years ago

Might want to retest this since we have a new network stack. Note that at the moment it uses some prototype data structures (lists instead of hash tables) that may not perform well under heavy load.

comment:7 by Jakub Jermář, 12 years ago

Now the command does not hang (I had to use -w 0 option with my current version of nc), but after some time, netecho stops printing the actual data and prints ???? instead.

comment:8 by Jakub Jermář, 12 years ago

Milestone: 0.5.00.5.1

Based on the 0.5.0 release bug court ruling, retargetting to 0.5.1.

comment:9 by Jakub Jermář, 10 years ago

Resolution: worksforme
Status: newclosed

The original problem is not reproducible - the networking stack does not hang.
Will open a ticket for the corrupted UDP packets.

Note: See TracTickets for help on using tickets.