Ticket #2048 (closed bug: invalid)

Opened 8 months ago

Last modified 8 months ago

get_team_info() does not work properly

Reported by: mmadia Owned by: axeld
Priority: normal Milestone: R1
Component: - General Version: R1 development
Cc: Blocked By:
Platform: All Blocking: #2999

Description

the function get_team_info() is used by im_kit's im_server, specifically in Server::UnloadAddons()

im_kit's svn: http://www.beclan.org/svn/repos/imkit/server/im_server.cpp code snippet:

while (info.thread_count > (protoCount + 1)) {

get_team_info(info.team, &info); snooze(20000);

}

Change History

Changed 8 months ago by mmadia

the observed behavior: im_server fails to load any protocols.

Changed 8 months ago by jackburton

Did you test if the preceding code breaks correctly when (or, if, at all) it finds the im_server (on haiku) ?

Changed 8 months ago by mmu_man

Note the code preceding it is incorrect (it searches for name ending with im_server), as "strace im_server" would come first in the process list. But fixing it still showed a wrong behaviour (it returned 6 while there was still only 1 thread last I tested). I worked around in the version I have, an tried to make a test case, but they seemed to work ok (before spawning a thread, after, after terminating it, ... seems consistent).

Changed 8 months ago by axeld

  • status changed from new to closed
  • resolution set to invalid

Are you sure the problem is get_team_info()? It really doesn't look like this is the case. num_threads seems to be correctly maintained, as does the team_info::id field.

Besides, this code looks broken to me, anyway, as it makes assumptions on the number of running threads that it cannot possibly know as it's implementation dependent - please fix your app.

Changed 3 weeks ago by axeld

  • blocking set to 2999

(In #2999) No need to, I just mark this as a duplicate.

Note: See TracTickets for help on using tickets.