After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 608245 - segmentation fault in gst-rtsp-server
segmentation fault in gst-rtsp-server
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-rtsp-server
git master
Other Linux
: Normal critical
: 0.10.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2010-01-27 12:35 UTC by sreerenj
Modified: 2010-01-27 17:44 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
segmentation fault in server side (927 bytes, patch)
2010-01-27 12:35 UTC, sreerenj
none Details | Review
gdb output of segmentation fault (18.72 KB, application/octet-stream)
2010-01-27 13:05 UTC, sreerenj
  Details

Description sreerenj 2010-01-27 12:35:03 UTC
Created attachment 152394 [details] [review]
segmentation fault in server side

Hi,

I found a segmentation fault in gst-rtsp-server.When the client side network is disabled and then re-enabled the network ,getting segmentation fault in server side.I think it is because of non handling of client dispatch in server side.(gst-plugin-base/gst-libs/gst/rtsp/gstrtspconnection.c).

when client side dispatched and then enabled, the return value is GST_RTSP_ESYS .And if gst_rtsp_source_dispatch() function falling to 
	
	goto error;

and return FALSE, it makes a segmentation fault.

But if server side network is disabled and reenabled then it will fallto 
   
    write_blocked;  

and it returns TRUE. so no problem there.
Comment 1 sreerenj 2010-01-27 12:36:15 UTC
I attached a diff file  here to avoid the segmentation fault .
Comment 2 sreerenj 2010-01-27 13:05:42 UTC
Created attachment 152395 [details]
gdb output of segmentation fault

gdb output
Comment 3 sreerenj 2010-01-27 13:06:39 UTC
Comment on attachment 152394 [details] [review]
segmentation fault in server side

patch to avoid the segmentation fault
Comment 4 Wim Taymans 2010-01-27 17:44:16 UTC
Your patch seems to make it ignore errors. I don't know why it crashes but it could be because the RTSP server does not implement an error_full function and if the memory is uninitialized this could result in calling bad code and crashing.

Try this patch in rtsp-server and reopen if that doesn't fix it:

commit ce6724f788ceac7b95a523d379f27b2d863ed605
Author: Wim Taymans <wim.taymans@collabora.co.uk>
Date:   Wed Jan 27 18:38:27 2010 +0100

    rtsp-client: implement error_full
    
    Implement error_full to avoid some segfaults when the rtspconnection calls it.
    
    See #608245