tsp-devel
[Top][All Lists]
Advanced

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

Re: WARNING [Tsp-devel] GDisp+ New Release.


From: Erk
Subject: Re: WARNING [Tsp-devel] GDisp+ New Release.
Date: Sun, 4 Dec 2005 12:29:25 +0100

Je ne comprends pas encore assez le code pour traquer efficacement
les [éventuels] bugs mais valgrind (http://www.valgrind.org) semble
m'indiquer "2 zones" d'erreurs comportant des lectures dans des
zones non initialisées et des écritures dépassant des zones alloués
ci-après les stacks traces valgrind.
Je pense qu'il ne faut pas trop faire attention aux
erreurs liées au syscall initiaux dans gdk.
Ni d'ailleurs au 'write buffer non initialisé" (dans un premier temps).
En revanche les:

 - Invalid read of size X
 - Invalid write of size Y

Sont plus louches, à vérifier par ceux qui connaissent le code :)) .
Pour d'autres infos générales sur le débuggage mémoire:
http://www.buzztard.org/index.php/Debugging#GLibC

Ci-après les stack traces.

Cas 1:
export STRACE_DEBUG=3 ; tsp_stub_server
valgrind tsp_gdisp+
New
Création page graphique 1x1
Sélection 4 premiers symboles dans un plot text
Start sampling:
address@hidden tsp]$ valgrind tsp_gdisp+
==14026== Memcheck, a memory error detector.
==14026== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==14026== Using LibVEX rev 1367, a library for dynamic binary translation.
==14026== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==14026== Using valgrind-3.0.1, a dynamic binary instrumentation framework.
==14026== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==14026== For more details, rerun with: -v
==14026==
==14026== Conditional jump or move depends on uninitialised value(s)
==14026==    at 0x1B8F55EF: index (strchr.S:177)
==14026==
==14026== Conditional jump or move depends on uninitialised value(s)
==14026==    at 0x1B8F5600: index (strchr.S:183)
==14026==
==14026== Syscall param write(buf) points to uninitialised byte(s)
==14026==    at 0x1BD0E363: __write_nocancel (in /lib/tls/libpthread-0.10.so)
==14026==    by 0x1BB3915D: (within /usr/X11R6/lib/libX11.so.6.2)
==14026==    by 0x1BB3945E: _X11TransWrite (in /usr/X11R6/lib/libX11.so.6.2)
==14026==    by 0x1BB1CEA4: (within /usr/X11R6/lib/libX11.so.6.2)
==14026==    by 0x1BB1CFCC: _XReply (in /usr/X11R6/lib/libX11.so.6.2)
==14026==    by 0x1BB083E2: XInternAtom (in /usr/X11R6/lib/libX11.so.6.2)
==14026==    by 0x1BA8D37B: gdk_atom_intern (in /usr/lib/libgdk-1.2.so.0.9.1)
==14026==  Address 0x1C02B61C is 124 bytes inside a block of size 16384 alloc'd
==14026==    at 0x1B900B78: calloc (vg_replace_malloc.c:279)
==14026==    by 0x1BB0C7D9: XOpenDisplay (in /usr/X11R6/lib/libX11.so.6.2)
==14026==    by 0x1BA73493: gdk_init_check (in /usr/lib/libgdk-1.2.so.0.9.1)
==14026==
==14026== Thread 3:
==14026== Syscall param write(buf) points to uninitialised byte(s)
==14026==    at 0x1BECAA8B: write (in /lib/tls/libc-2.3.5.so)
==14026==    by 0x1BEFB6C4: (within /lib/tls/libc-2.3.5.so)
==14026==    by 0x1BF01DEF: xdrrec_endofrecord (in /lib/tls/libc-2.3.5.so)
==14026==    by 0x1BEFB19D: (within /lib/tls/libc-2.3.5.so)
==14026==    by 0x80713BA: tsp_request_sample_1 (tsp_rpc_clnt.c:104)
==14026==    by 0x806FABC: TSP_request_sample (tsp_client.c:291)
==14026==    by 0x806AA9C: TSP_consumer_request_sample (tsp_consumer.c:996)
==14026==    by 0x805D02F: gdisp_samplingThread (gdisp_sampling.c:604)
==14026==    by 0x1BD09C3F: start_thread (in /lib/tls/libpthread-0.10.so)
==14026==    by 0x1BEDA0ED: clone (in /lib/tls/libc-2.3.5.so)
==14026==  Address 0x1C25D4A4 is 52 bytes inside a block of size 8004 alloc'd
==14026==    at 0x1B8FF896: malloc (vg_replace_malloc.c:149)
==14026==    by 0x1BF01EB6: xdrrec_create (in /lib/tls/libc-2.3.5.so)
==14026==    by 0x1BEFAEF8: clnttcp_create (in /lib/tls/libc-2.3.5.so)
==14026==    by 0x1BEF9E89: clnt_create (in /lib/tls/libc-2.3.5.so)
==14026==    by 0x806E806: tsp_remote_open_progid (tsp_client.c:86)
==14026==    by 0x806EBC7: TSP_remote_open_server (tsp_client.c:135)
==14026==    by 0x8067EA5: TSP_consumer_connect_url (tsp_consumer.c:480)
==14026==    by 0x80567D8: gdisp_insertProvider (gdisp_consumers.c:109)
==14026==    by 0x8056DAB: gdisp_insertHostProviders (gdisp_consumers.c:303)
==14026==    by 0x8057014: gdisp_consumingInit (gdisp_consumers.c:440)
==14026==    by 0x8052B51: gdisp_newConfiguration (gdisp_configuration.c:1480)
==14026==    by 0x80534A9: gdisp_launchAction (gdisp_mainBoard.c:347)
==14026==
==14026== Thread 1:
==14026== Invalid read of size 4
==14026==    at 0x1BD09F2B: pthread_detach (in /lib/tls/libpthread-0.10.so)
==14026==    by 0x805CB04: gdisp_createThread (gdisp_sampling.c:123)
==14026==    by 0x805D6AC: gdisp_startSamplingProcess (gdisp_sampling.c:1059)
==14026==    by 0x80540F7: gdisp_togglePlayModeCallback (gdisp_pilotBoard.c:87)
==14026==    by 0x1B9C1ED5: gtk_marshal_NONE__NONE (in
/usr/lib/libgtk-1.2.so.0.9.1)
==14026==    by 0xA314: ???
==14026==  Address 0x48 is not stack'd, malloc'd or (recently) free'd
==14026==
==14026== Process terminating with default action of signal 11
(SIGSEGV): dumping core
==14026==  Access not within mapped region at address 0x48
==14026==    at 0x1BD09F2B: pthread_detach (in /lib/tls/libpthread-0.10.so)
==14026==    by 0x805CB04: gdisp_createThread (gdisp_sampling.c:123)
==14026==    by 0x805D6AC: gdisp_startSamplingProcess (gdisp_sampling.c:1059)
==14026==    by 0x80540F7: gdisp_togglePlayModeCallback (gdisp_pilotBoard.c:87)
==14026==    by 0x1B9C1ED5: gtk_marshal_NONE__NONE (in
/usr/lib/libgtk-1.2.so.0.9.1)
==14026==    by 0xA314: ???
==14026==
==14026== ERROR SUMMARY: 197 errors from 5 contexts (suppressed: 70 from 3)
==14026== malloc/free: in use at exit: 6799493 bytes in 7217 blocks.
==14026== malloc/free: 27099 allocs, 19882 frees, 8240740 bytes allocated.
==14026== For counts of detected errors, rerun with: -v
==14026== searching for pointers to 7217 not-freed blocks.
==14026== checked 32355360 bytes.
==14026==
==14026== LEAK SUMMARY:
==14026==    definitely lost: 12163 bytes in 69 blocks.
==14026==      possibly lost: 204 bytes in 3 blocks.
==14026==    still reachable: 6787126 bytes in 7145 blocks.
==14026==         suppressed: 0 bytes in 0 blocks.
==14026== Use --leak-check=full to see details of leaked memory.
Processus arrêté

Cas 2:
export STRACE_DEBUG=3 ; tsp_stub_server
valgrind tsp_gdisp+
Open stub_test.xml
Save as stub_test2.xml
Open stub_test.xml

address@hidden tsp]$ valgrind tsp_gdisp+
==14053== Memcheck, a memory error detector.
==14053== Copyright (C) 2002-2005, and GNU GPL'd, by Julian Seward et al.
==14053== Using LibVEX rev 1367, a library for dynamic binary translation.
==14053== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==14053== Using valgrind-3.0.1, a dynamic binary instrumentation framework.
==14053== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==14053== For more details, rerun with: -v
==14053==
==14053== Conditional jump or move depends on uninitialised value(s)
==14053==    at 0x1B8F55EF: index (strchr.S:177)
==14053==
==14053== Conditional jump or move depends on uninitialised value(s)
==14053==    at 0x1B8F5600: index (strchr.S:183)
==14053==
==14053== Syscall param write(buf) points to uninitialised byte(s)
==14053==    at 0x1BD0E363: __write_nocancel (in /lib/tls/libpthread-0.10.so)
==14053==    by 0x1BB3915D: (within /usr/X11R6/lib/libX11.so.6.2)
==14053==    by 0x1BB3945E: _X11TransWrite (in /usr/X11R6/lib/libX11.so.6.2)
==14053==    by 0x1BB1CEA4: (within /usr/X11R6/lib/libX11.so.6.2)
==14053==    by 0x1BB1CFCC: _XReply (in /usr/X11R6/lib/libX11.so.6.2)
==14053==    by 0x1BB083E2: XInternAtom (in /usr/X11R6/lib/libX11.so.6.2)
==14053==    by 0x1BA8D37B: gdk_atom_intern (in /usr/lib/libgdk-1.2.so.0.9.1)
==14053==  Address 0x1C02B61C is 124 bytes inside a block of size 16384 alloc'd
==14053==    at 0x1B900B78: calloc (vg_replace_malloc.c:279)
==14053==    by 0x1BB0C7D9: XOpenDisplay (in /usr/X11R6/lib/libX11.so.6.2)
==14053==    by 0x1BA73493: gdk_init_check (in /usr/lib/libgdk-1.2.so.0.9.1)
==14053==
==14053== Invalid read of size 1
==14053==    at 0x8060B7E: gdisp_dereferenceSymbolList (gdisp_utils.c:758)
==14053==    by 0x8064F81: gdisp_destroyPlotText (gdisp_plotText.c:215)
==14053==    by 0x805A8D2: gdisp_destroyGraphicPage (gdisp_pages.c:128)
==14053==    by 0x805C9F2: gdisp_destroyAllGraphicPages (gdisp_pages.c:1761)
==14053==    by 0x8052B88: gdisp_closeConfiguration (gdisp_configuration.c:1510)
==14053==    by 0x8052C2B: gdisp_openConfigurationFile
(gdisp_configuration.c:1564
)
==14053==    by 0x80534A9: gdisp_launchAction (gdisp_mainBoard.c:347)
==14053==    by 0x1B9C1ED5: gtk_marshal_NONE__NONE (in
/usr/lib/libgtk-1.2.so.0.9.
1)
==14053==    by 0xA314: ???
==14053==  Address 0x1C249068 is not stack'd, malloc'd or (recently) free'd
==14053==
==14053== Invalid write of size 1
==14053==    at 0x8060B86: gdisp_dereferenceSymbolList (gdisp_utils.c:758)
==14053==    by 0x8064F81: gdisp_destroyPlotText (gdisp_plotText.c:215)
==14053==    by 0x805A8D2: gdisp_destroyGraphicPage (gdisp_pages.c:128)
==14053==    by 0x805C9F2: gdisp_destroyAllGraphicPages (gdisp_pages.c:1761)
==14053==    by 0x8052B88: gdisp_closeConfiguration (gdisp_configuration.c:1510)
==14053==    by 0x8052C2B: gdisp_openConfigurationFile
(gdisp_configuration.c:1564                          )
==14053==    by 0x80534A9: gdisp_launchAction (gdisp_mainBoard.c:347)
==14053==    by 0x1B9C1ED5: gtk_marshal_NONE__NONE (in
/usr/lib/libgtk-1.2.so.0.9.                          1)
==14053==    by 0xA314: ???
==14053==  Address 0x1C249068 is not stack'd, malloc'd or (recently) free'd
==14053==
==14053== ERROR SUMMARY: 96 errors from 5 contexts (suppressed: 70 from 3)
==14053== malloc/free: in use at exit: 296602 bytes in 2439 blocks.
==14053== malloc/free: 23679 allocs, 21240 frees, 8315036 bytes allocated.
==14053== For counts of detected errors, rerun with: -v
==14053== searching for pointers to 2439 not-freed blocks.
==14053== checked 684616 bytes.
==14053==
==14053== LEAK SUMMARY:
==14053==    definitely lost: 20294 bytes in 70 blocks.
==14053==      possibly lost: 0 bytes in 0 blocks.
==14053==    still reachable: 276308 bytes in 2369 blocks.
==14053==         suppressed: 0 bytes in 0 blocks.
==14053== Use --leak-check=full to see details of leaked memory.


Le 03/12/05, Stef Euskadi<address@hidden> a écrit :
> ALARM !!!!!!!!!!!!
>
>  Vous n'avez pas de restauration de configuration parce que j'ai oublié
>  d'enlever les commentaires (/* ... */) autour d'une instruction.
>  J'avais posé ces commentaires pendant ma phase de débug.
>  Sorry.
>
>  C'est commité.
>
>  Euskadi.
>
> Le 03/12/05, Erk <address@hidden> a écrit :
> > Stéph,
> >
> > En browsant le code de gdsip+ pour essayer de comprendre ce qu'il
> > se passe je m'aperçois que je connais si mal le code que je comprends
> > pas grand chose....
> >
> > Est-ce que tu pourrais nous gratifier d'un mail introductif à
> > l'archi logicielle de gdisp+ et plus particulièrement la gestion
> > des symboles et provider ceci afin que je puisse m'y mettre
> > plus efficacement, et peut-être ne serais-je pas le seul...
> >
> > C'est à mon tour de demander de la doc :)))
> >
> >
> > Le 03/12/05, Stef Euskadi<address@hidden> a écrit :
> > > Agur,
> > >
> > >  Je viens de commiter une nouvelle release de GDisp+.
> > >
> > >  La grosse nouveauté est la possibilité de sauvegarder votre
> > >  travail en créant des configurations (on sauvegarde l'ensemble
> > >  des providers sollicités, les symboles utilisés, les pages graphiques
> > >  créées et les divers plots présents).
> > >
> > >  Ca, c'est le bon côté de la nouvelle.
> > >
> > >  ...parce qu'il y a un mauvais côté.... je jardine en mémoire.
> > >
> > >  Lors de 2 ou 3 chargements / déchargements, ça explose.
> > >
> > >  Pour l'instant, je ne trouve pas l'origine du truc. Même le
> _MALLOC_CHECK
> > >  ne me dit rien (ou alors je ne sais pas l'utiliser, à vous de me dire),
> ni
> > > GDB
> > >  ni le portage sous Solaris 8 avec les outils d'analyse du SunWorkShop.
> > >
> > >  Je préfère néanmoins vous proposer l'outil en l'état afin que vous
> puissiez
> > >  l'utiliser et éventuellement passer un peu de temps à traquer ce fichu
> bug
> > >  (il suffit d'ouvrir une configuration, puis "close"...plusieurs fois).
> > >
> > >  L'outil redevient 100% opérationnel sans l'utilisation de la
> configuration.
> > >
> > >  --
> > > Euskadi.
> > > _______________________________________________
> > > Tsp-devel mailing list
> > > address@hidden
> > > http://lists.nongnu.org/mailman/listinfo/tsp-devel
> > >
> > >
> > >
> >
> >
> > --
> > Erk
> >
> >
> > _______________________________________________
> > Tsp-devel mailing list
> > address@hidden
> > http://lists.nongnu.org/mailman/listinfo/tsp-devel
> >
>
>
>
> --
> --
> Euskadi.


--
Erk




reply via email to

[Prev in Thread] Current Thread [Next in Thread]