bugTransport Sample Protocol - Bugs: bug #19179, Garbage collector thread wrongly...

 
 

bug #19179: Garbage collector thread wrongly close TSP session

Submitted by:  Eric NOULARD <erk>
Submitted on:  Thu 01 Mar 2007 04:33:35 PM UTC  
 
Category: CoreSeverity: 4 - Important
Status: Ready For TestPrivacy: Public
Assigned to: Eric NOULARD <erk>Open/Closed: Closed
Release: 0.8.2Fixed Release: 0.8.3

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 02 Apr 2007 11:38:37 AM UTC, comment #5:

Ok fine.
I'd rather ear that you used the
wrong version than admitting my fix was buggy :))
[Just kidding of course]

I don't know if you have seen it but we made
a pre-0.8.3 release candidate for the Workshop
which contains your patch (with other modifications):
http://download.savannah.nongnu.org/releases/tsp/sources/tsp-0.8.3-rc1-Source.tar.gz

You may use it instead of 0.8.2 + patch,
if you want to use an identified version.

For a released TSP version you may verify the TSP version
number with almost any TSP command-line tool.

For example with tsp_request_generic
-------------------------------------
tsp_request_generic -h
Invalid command line option(s), correct it and rerun
tsp_request_generic::unknown tsp_request_generic request
TSP generic consumer v0.8.3-rc1 (https://savannah.nongnu.org/projects/tsp)
TSP XDR encoding/decoding method is: <TSP_NO_XDR_ENCODE>

Nevertheless 0.8.2 + Patch won't show you 0.8.2+patchXXXX
I'll think about adding such feature in the future.

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Mon 02 Apr 2007 11:06:13 AM UTC, comment #4:

I'm really sorried concerning my last comment.In fact, your patch is correct and it works good.
We have made the test with the non-patched version.

Sorry and thanks for your answer
Sarah Montigaud

montigaud <sarah_montigaud>
Mon 02 Apr 2007 09:23:51 AM UTC, comment #3:

>> <rpc://pludtune/StubbedServer:2>


Nice hostname :))

The problem seems to be here again
since the session is "garbage collected":

>>

Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_provider.c##TSP_provider_garbage_collector_thread##575: Will garbage collect session channel_id <0> in state <6>

>>


It is showing itself in the "user" case because
the garbage collector thread find its time
to run during the user "sleep".

I'll have to try reproduce the problem
but I do not see (at first glance) why the session
would be garbage collected.

Are you sure you use the patched TSP version,
because the behavior is the same as with the
non-patched version.

I'm not sure to have time to investigate this
quickly, anybody wanting to take over?

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Mon 02 Apr 2007 08:33:08 AM UTC, comment #2:

Hi,

Concerning this bug, i try to test it and i programm the folowing steps:

> 1.user builds the list of parameters he wants to acquired
> --> the list of symbols : _symbols
> TSP_consumer_request_sample(_provider,&_symbols);
> 2.start sampling sequence
> TSP_consumer_request_sample_init(_provider, 0, 0)
> 3.read sample (loop)
> tsp_consumer_read_sample()
> 4.reset the list of parameters he wants to acquired
> tsp_consumer_request_sample_destroy(_provider)
> 5.user builds a new list of parameters and start sampling
> TSP_consumer_request_sample_init(_provider, 0, 0);
> tsp_consumer_read_sample();


This programmation is now OK.

But, in my project,the steps are programmed by user .In this way, when the user wants to destroy and then to have a new acquisition cycle,there's a time sleep between the steps.That's why, i programm now theses actions:

> 2
> TSP_consumer_request_sample_init(_provider, 0, 0)

tsp_sleep(20 secondes approximatively );

> 3
> tsp_consumer_read_sample()

tsp_sleep(20 secondes approximatively );

> 4
> tsp_consumer_request_sample_destroy(_provider)

tsp_sleep(20 secondes approximatively );

> 5
> TSP_consumer_request_sample_init(_provider, 0, 0);

tsp_sleep(20 secondes approximatively );

> tsp_consumer_read_sample();


My TSP problem:
In provider side,i have the following stracedebug():
TSP Provider on PID 31051 - URL #0 : <rpc://pludtune/StubbedServer:2>
TSP Request||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_provider.c##TSP_provider_request_open##285: OPEN
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_session.c##TSP_add_session##294: New consumer registered with TSP channel_id=0
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_session.c##TSP_session_change_stateTo##147: Session was in state <0> goes to <1>
TSP Request||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_provider.c##TSP_provider_request_filtered_information##414: FILTERED INFORMATIONS channel_id=<0>
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_provider.c##TSP_provider_request_filtered_information##434: Requested filter kind <2>, filter string = <timestamp>
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_default_glu.c##GLU_get_filtered_ssi_list_default##254: Requested filter kind <2>, filter string = <timestamp>
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_default_glu.c##GLU_get_filtered_ssi_list_default##264: Nb Match(es) is <1>
TSP Request||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_provider.c##TSP_provider_request_sample##456: SAMPLE channel_id=<0>
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_provider.c##TSP_provider_request_sample##466: Consumer No 0 asked for 2 symbols
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_default_glu.c##GLU_get_pgi_default##200: Found symbol <symbolD> pgi=<4>
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_default_glu.c##GLU_get_pgi_default##200: Found symbol <symbolE> pgi=<5>
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_group_algo.c##TSP_group_algo_get_nb_groups##122: Found <1> group(s) for request with <2> symbol(s)
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_group_algo.c##TSP_group_algo_get_groups_summed_size##177: Groups_summed_size is 2
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_group_algo.c##TSP_group_algo_allocate_group_table##240: Max group size = 2
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_session.c##TSP_session_change_stateTo##147: Session was in state <1> goes to <3>
TSP Request||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_provider.c##TSP_provider_request_sample##456: SAMPLE channel_id=<0>
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_provider.c##TSP_provider_request_sample##466: Consumer No 0 asked for 3 symbols
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_default_glu.c##GLU_get_pgi_default##200: Found symbol <timestamp> pgi=<0>
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_default_glu.c##GLU_get_pgi_default##200: Found symbol <symbolD> pgi=<4>
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_default_glu.c##GLU_get_pgi_default##200: Found symbol <symbolE> pgi=<5>
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_group_algo.c##TSP_group_algo_get_nb_groups##122: Found <1> group(s) for request with <3> symbol(s)
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_group_algo.c##TSP_group_algo_get_groups_summed_size##177: Groups_summed_size is 3
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_group_algo.c##TSP_group_algo_allocate_group_table##240: Max group size = 3
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_session.c##TSP_session_change_stateTo##147: Session was in state <3> goes to <3>
TSP Request||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_provider.c##TSP_provider_request_sample_init##508: SAMPLE_INIT channel_id=<0>
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_stream_sender.c##TSP_stream_sender_get_data_address_string##286: -->address='140.94.13.171:60860'
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_session.c##TSP_session_change_stateTo##147: Session was in state <3> goes to <4>
start envoi des donnees 3
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_session.c##TSP_session_change_stateTo##147: Session was in state <4> goes to <5>
TSP Request||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_provider.c##TSP_provider_request_sample_destroy##547: SAMPLE DESTROY channel_id=<0>
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_session.c##TSP_session_change_stateTo##147: Session was in state <5> goes to <6>
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_provider.c##TSP_provider_garbage_collector_thread##575: Will garbage collect session channel_id <0> in state <6>
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_provider.c##TSP_provider_garbage_collector_thread##592: Sending missing REQUEST CLOSE to channel_id <0> in state <6>
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_session.c##TSP_session_change_stateTo##147: Session was in state <6> goes to <2>
Info||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_provider.c##TSP_provider_garbage_collector_thread##595: Session No 0 'garbage-collected'
TOP 10 valtimestamp :>0< nb symbol>1075970048<
TOP 20 valtimestamp :>0< nb symbol>1077084160<
TSP Request||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_provider.c##TSP_provider_request_sample_init##508: SAMPLE_INIT channel_id=<0>
ERROR||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_session.c##TSP_get_session##125: No session found for channel_id=0
ERROR||/home/intocv61/VAla/TSP/sources/src/core/ctrl/tsp_session.c##TSP_session_get_GLU_by_channel##209: Unable to get session for channel_id=0

Thanks
Sarah

montigaud <sarah_montigaud>
Thu 01 Mar 2007 05:43:23 PM UTC, comment #1:

I've just checked-in a fix in CVS.
I've attach a patch file which should be OK for
tsp-0.8.[23].

The trouble was that I messed up local datapool handling
case for passive GLU vs global datapool for active GLU.

It should now be OK for active GLU (most common case)
I'll test more for passive GLU.

Passive GLU is just a nice feature but really annoying
and/or tricky sometimes.

Some time ago
Yves wanted to just drop passive GLU support
may be he was right, I'll resist a little more.

Please try again and tell me if it's OK for you now.

(file #12083)

Eric NOULARD <erk>
Project AdministratorIn charge of this item.
Thu 01 Mar 2007 04:33:35 PM UTC, original submission:

When trying to proceed with the sequence
1) TSP connect url
2) TSP request open
3) request sample
4) request sample init
5) read_sample * n
6) request sample destroy
7) request sample
8) request sample init
9) read_sample * n
10) request sample destroy
11) request close

The step 7) failed (sometimes randomly) because
session does not exists any more.

In fact the garbage collector thread has closed the
session.

Initially stated by:
http://lists.gnu.org/archive/html/tsp-devel/2007-02/msg00037.html
Confirmed:
http://lists.gnu.org/archive/html/tsp-devel/2007-02/msg00039.html

Eric NOULARD <erk>
Project AdministratorIn charge of this item.

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #12083:  bug19179-erk1.patch added by erk (2KiB - text/x-patch - Convenient patch for tsp 0.8.2 or 0.8.3)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by sarah_montigaud (Posted a comment)
  • -unavailable- added by erk (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 8 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Fri 27 Apr 2007 11:21:16 AM UTCerkOpen/ClosedOpen=>Closed
    Fri 27 Apr 2007 11:12:19 AM UTCerkRelease0.8.3=>0.8.2
      Fixed ReleaseNextRelease=>0.8.3
    Thu 01 Mar 2007 05:43:23 PM UTCerkAttached File-=>Added bug19179-erk1.patch, #12083
      StatusConfirmed=>Ready For Test
    Thu 01 Mar 2007 04:33:35 PM UTCerkCarbon-Copy-=>Added -unavailable-
      Carbon-Copy-=>Added -unavailable-
      Carbon-Copy-=>Added -unavailable-

    Back to the top


    Powered by Savane 3.1-cleanup1