Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#455 closed defect (fixed)

TCP uses threads in an unsupported way

Reported by: Jakub Jermář Owned by: Jiri Svoboda
Priority: minor Milestone: 0.5.0
Component: helenos/net/tcp Version: mainline
Keywords: Cc:
Blocker for: Depends on:
See also:

Description

tcp_rqueue_thread_start() creates an instance of the tcp_rqueue_thread thread. The idea is probably to dedicate the new thread entirely to this funtion. However, since the functions called from it, such as tcp_as_segment_arrived(), use fibril synchonization, it is likely that the thread will execute other fibrils too. It will gradually become just another execution unit for running fibrils.

Change History (6)

comment:1 by Jiri Svoboda, 12 years ago

Priority: majorminor

tcp_rqueue_thread needs to run in background. It could be achieved using just a new fibril. My idea indeed was that if I create it as a thread, it could potentially run in parallel on MP. You are right that this in fact just creates a new worker thread, so the better thing to do would be to create just a fibril.

This, by the way, means that you will almost never create non-worker threads, except for some very rare situations.

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

I actually suspect this may be causing TCP hangs. When running tester malloc1 test over telnet or when downloading a multi-megabyte file using HTTP, TCP sometimes hangs. Taskdump shows three threads waiting in one of the manager fibrils.

comment:3 by Jiri Svoboda, 12 years ago

How would that be possible? Shouldn't the net effect of this be just multiple worker threads? If it cau1sed hangs, there would be something rotten… Anyway, fixed in mainline,1487 You can try and see if the symptoms persist. Btw. how can remcons be working? It should not work due to #456.

Version 0, edited 12 years ago by Jiri Svoboda (next)

comment:4 by Jiri Svoboda, 12 years ago

Resolution: fixed
Status: newclosed

in reply to:  3 comment:5 by Jakub Jermář, 12 years ago

Replying to svoboda:

How would that be possible? Shouldn't the net effect of this be just multiple worker threads? If it caused hangs, there would be something rotten…

True, we will need to look at that separately.

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

Milestone: 0.5.10.5.0
Note: See TracTickets for help on using tickets.