Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Occassional Segmentation Faults #3

Closed
mceyzar opened this issue Nov 14, 2014 · 16 comments
Closed

Occassional Segmentation Faults #3

mceyzar opened this issue Nov 14, 2014 · 16 comments

Comments

@mceyzar
Copy link

mceyzar commented Nov 14, 2014

Hi There, I've built and installed Mona Server in Centos 7 (latest from GIT as of 7/11/2014).
I do get occasional SEGFAULT and could not pin point of why it is doing it.
It is quiet random although the more connections/disconnection I make the more likelihood of it happening.
I'm running it under GDB at the moment with debug build (make debug on all, base, core and server) When the crash happens (which could happen in 2 seconds or 2 days)
I will paste what i can find here.

@thomasjammet
Copy link
Contributor

Hi mceyzar

Thank you for your report, could you tell us for which purpose you use
Mona? Because we are currently working on a possible issue with HTTP but it
requires some refactoring.
Il 14/nov/2014 03:03 "mceyzar" notifications@github.com ha scritto:

Hi There, I've built and installed Mona Server in Centos 7 (latest from GIT
as of 7/11/2014).
I do get occasional SEGFAULT and could not pin point of why it is doing it.
It is quiet random although the more connections/disconnection I make the
more likelihood of it happening.
I'm running it under GDB at the moment with debug build (make debug on all,
base, core and server) When the crash happens (which could happen in 2
seconds or 2 days)
I will paste what i can find here.


Reply to this email directly or view it on GitHub
#3.

@mceyzar
Copy link
Author

mceyzar commented Nov 14, 2014

Hi, I am only using the RTMP.

HTTP and RTMFP are being used by Apache and Cumulus (will eventually replace Cumulus with Mona).

However, it behave itself today, it is still running stable on debug mode under GDB and has not crashed.

The only difference with last week is that I have now installed and enabled SE Linux.
I dont know if that makes a different, I will keep watching and if it crash again, I will let you know the back trace :)

Regards

Mirza Ceyzar

@thomasjammet
Copy link
Contributor

Hi, i'm not sure for SELinux, it's not a firewall so it should not alter
incomming connections on HTTP port.

If it comes from HTTP like I think you can first change the port used by
HTTP in the MonaServer.ini file (take a look at
http://monasolutions.github.io/MonaServer/installation.html#configurations
to manage configuration). They are often some robots trying to get infos
from server using well known ports of HTTP (80, 8080). You can run Mona
with maximum logs (--log=8) and look for connections into logs/log.0 file.

For this issue we are currently working on. If you're interested in using
Mona for HTTP you can ask us for further informations. For RTMFP you can
already use Mona, it's the most recent version.
Il 14/nov/2014 08:13 "mceyzar" notifications@github.com ha scritto:

Hi, I am only using the RTMP.

HTTP and RTMFP are being used by Apache and Cumulus (will eventually
replace Cumulus with Mona).

However, it behave itself today, it is still running stable on debug mode
under GDB and has not crashed.

The only difference with last week is that I have now installed and
enabled SE Linux.
I dont know if that makes a different, I will keep watching and if it
crash again, I will let you know the back trace :)

Regards

Mirza Ceyzar


Reply to this email directly or view it on GitHub
#3 (comment)
.

@mceyzar
Copy link
Author

mceyzar commented Nov 16, 2014

Hmmm, I'm not using HTTP for that Mona instance. Only RTMP. are you saying it is still possible for the segmentation fault to happen due to HTTP request being falsely triggered to Mona ?

At the moment our setup is:
HTTP: served by Apache, we are running python, pyamf and django.
RTMP: Mona.
RTMFP: used to be Cumulus now i just use Mona.

I will try the maximum log (8) to see if anything. shows up.

So far it has not crashed since Friday, but then again, there was no requests to it during the weekend.

Regards

Mirza Ceyzar

@mceyzar
Copy link
Author

mceyzar commented Nov 17, 2014

It just crashed now, not much info:
Here is GDB:

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7ffff2423700 (LWP 28299)]
0x00007ffff5fbe847 in __memcpy_ssse3 () from /lib64/libc.so.6
Missing separate debuginfos, use: debuginfo-install glibc-2.17-55.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.11.3-49.el7.x86_64 libcom_err-1.42.9-4.el7.x86_64 libgcc-4.8.2-16.2.el7_0.x86_64 libselinux-2.2.2-6.el7.x86_64 libstdc++-4.8.2-16.2.el7_0.x86_64 openssl-libs-1.0.1e-34.el7_0.4.x86_64 pcre-8.32-12.el7.x86_64 xz-libs-5.1.2-8alpha.el7.x86_64 zlib-1.2.7-13.el7.x86_64
(gdb) bt
#0 0x00007ffff5fbe847 in __memcpy_ssse3 () from /lib64/libc.so.6
#1 0x40000000000071ce in ?? ()
#2 0x4500000000000000 in ?? ()
#3 0x0000000000000000 in ?? ()

@mceyzar
Copy link
Author

mceyzar commented Nov 17, 2014

Ok it crashed again with --log=8
here is the last things it spits out:

sources/FlashStream.cpp[38] FlashStream 0 deleted
sources/Sessions.cpp[83] Session RTMP session 2 died
sources/Server.cpp[138] 1 clients
sources/Session.cpp[49] peer.id 633116ef0df1ad22d5861cbd5dad8962269b218ec404c36b356af76c6a017b62
Mona/Sessions.h[132] Session RTMP session 2 created
sources/FlashStream.cpp[33] FlashStream 0 created
sources/Peer.cpp[203] Client 10.2.20.7:57101 connection
sources/Server.cpp[138] 2 clients
sources/FlashStream.cpp[38] FlashStream 0 deleted
sources/Sessions.cpp[83] Session RTMP session 2 died
sources/Server.cpp[138] 1 clients
sources/Session.cpp[49] peer.id 3497b737aabf4f0f73ab6132fbb3998aeb8e102a5df4d82955f4aae8722529c0
Mona/Sessions.h[132] Session RTMP session 2 created
sources/PoolThread.cpp[58] RTMPHandshaker, Unable to validate client
sources/Sessions.cpp[83] Session RTMP session 2 died
sources/Session.cpp[49] peer.id 384d4b81de2e0363136de9583e9bd7f473ef6940bd0ac8260f791975ce276bc8
Mona/Sessions.h[132] Session RTMP session 2 created
sources/PoolThread.cpp[58] RTMPHandshaker, Unable to validate client
sources/Sessions.cpp[83] Session RTMP session 2 died
sources/Session.cpp[49] peer.id eda160221d86bfad0481b0e513b52d2d4962ed8dbbe8cc8fd78337f59d849bcb
Mona/Sessions.h[132] Session RTMP session 2 created
sources/PoolThread.cpp[58] RTMPHandshaker, Unable to validate client
sources/Sessions.cpp[83] Session RTMP session 2 died
sources/Session.cpp[49] peer.id 23a417dff7ef90d8a8cd4f4421987232800b20c2a1b64e577194b0a439b4db8b
Mona/Sessions.h[132] Session RTMP session 2 created
MonaServer: sources/Application.cpp:65: Assertion `Segmentation violation' failed.
Aborted (core dumped)
You have new mail in /var/spool/mail/root

@thomasjammet
Copy link
Contributor

Ok, now I don't think it comes from a HTTP problem.
Could you mail me the core and the log.0 file? And possibly your application dir?

@thomasjammet
Copy link
Contributor

Do you have some news? If you can send me your files we will correct the
problem soon.

Thomas

2014-11-17 8:29 GMT+01:00 mceyzar notifications@github.com:

Ok it crashed again with --log=8
here is the last things it spits out:

sources/FlashStream.cpp[38] FlashStream 0 deleted
sources/Sessions.cpp[83] Session RTMP session 2 died
sources/Server.cpp[138] 1 clients
sources/Session.cpp[49] peer.id
633116ef0df1ad22d5861cbd5dad8962269b218ec404c36b356af76c6a017b62
Mona/Sessions.h[132] Session RTMP session 2 created
sources/FlashStream.cpp[33] FlashStream 0 created
sources/Peer.cpp[203] Client 10.2.20.7:57101 connection
sources/Server.cpp[138] 2 clients
sources/FlashStream.cpp[38] FlashStream 0 deleted
sources/Sessions.cpp[83] Session RTMP session 2 died
sources/Server.cpp[138] 1 clients
sources/Session.cpp[49] peer.id
3497b737aabf4f0f73ab6132fbb3998aeb8e102a5df4d82955f4aae8722529c0
Mona/Sessions.h[132] Session RTMP session 2 created
sources/PoolThread.cpp[58] RTMPHandshaker, Unable to validate client
sources/Sessions.cpp[83] Session RTMP session 2 died
sources/Session.cpp[49] peer.id
384d4b81de2e0363136de9583e9bd7f473ef6940bd0ac8260f791975ce276bc8
Mona/Sessions.h[132] Session RTMP session 2 created
sources/PoolThread.cpp[58] RTMPHandshaker, Unable to validate client
sources/Sessions.cpp[83] Session RTMP session 2 died
sources/Session.cpp[49] peer.id
eda160221d86bfad0481b0e513b52d2d4962ed8dbbe8cc8fd78337f59d849bcb
Mona/Sessions.h[132] Session RTMP session 2 created
sources/PoolThread.cpp[58] RTMPHandshaker, Unable to validate client
sources/Sessions.cpp[83] Session RTMP session 2 died
sources/Session.cpp[49] peer.id
23a417dff7ef90d8a8cd4f4421987232800b20c2a1b64e577194b0a439b4db8b
Mona/Sessions.h[132] Session RTMP session 2 created
MonaServer: sources/Application.cpp:65: Assertion `Segmentation violation'
failed.
Aborted (core dumped)
You have new mail in /var/spool/mail/root


Reply to this email directly or view it on GitHub
#3 (comment)
.

@mceyzar
Copy link
Author

mceyzar commented Nov 21, 2014

Hi, sorry I have been sick in the past week. I will clean up log as it is very big, re run Mona and when it crash i will attach fresh Logfile, Corefile and main.lua. There is also a crash report mailed to sys admin, do you want that too ?

@thomasjammet
Copy link
Contributor

Hi! Sorry for your illness!

No I don't need the crash report, thank you for your help!

Thomas
Il 21/nov/2014 02:37 "mceyzar" notifications@github.com ha scritto:

Hi, sorry I have been sick in the past week. I will clean up log as it is
very big, re run Mona and when it crash i will attach fresh Logfile,
Corefile and main.lua. There is also a crash report mailed to sys admin, do
you want that too ?


Reply to this email directly or view it on GitHub
#3 (comment)
.

@thomasjammet
Copy link
Contributor

We have take a look at yout GDB output, I wonder if you have compiled Mona with debug info. If you don't please clean projects (with "make clean") and re-compile with debug info : "make debug" (for MonaBase/MonaCore/MonaServer).

Thank you.
Thomas

@mceyzar
Copy link
Author

mceyzar commented Nov 21, 2014

I'm pretty sure it was compiled with debug (I do not mind rebuilding), anyway, it just crashed again:

the lest things printed out are:
sources/FlashStream.cpp[38] FlashStream 0 deleted
sources/Sessions.cpp[83] Session RTMP session 1 died
sources/Server.cpp[138] 0 clients
sources/Session.cpp[49] peer.id c00465debf7b6d5d3a340afb4bd61fd700c9c45c1603d9a5546c79495b8d7b1d
Mona/Sessions.h[132] Session RTMP session 1 created
MonaServer: sources/Application.cpp:65: Assertion `Segmentation violation' failed.
Aborted (core dumped)

how do you want me to pass the log.0, main.lua and core file ?

@thomasjammet
Copy link
Contributor

Ok, just send me a mail at jammetthomas@gmail.com.
Do you have a gmail address? or skype?

--

Thomas JAMMET
Freelancer
2 Rue Mila - 82000 Montauban (France)
Tel. : (+33) 06 23 46 39 80
http://fr.linkedin.com/pub/thomas-jammet/5a/411/60b/

2014-11-21 8:37 GMT+01:00 mceyzar notifications@github.com:

I'm pretty sure it was compiled with debug (I do not mind rebuilding),
anyway, it just crashed again:

the lest things printed out are:
sources/FlashStream.cpp[38] FlashStream 0 deleted
sources/Sessions.cpp[83] Session RTMP session 1 died
sources/Server.cpp[138] 0 clients
sources/Session.cpp[49] peer.id
c00465debf7b6d5d3a340afb4bd61fd700c9c45c1603d9a5546c79495b8d7b1d
Mona/Sessions.h[132] Session RTMP session 1 created
MonaServer: sources/Application.cpp:65: Assertion `Segmentation violation'
failed.
Aborted (core dumped)

how do you want me to pass the log.0, main.lua and core file ?


Reply to this email directly or view it on GitHub
#3 (comment)
.

@mceyzar
Copy link
Author

mceyzar commented Nov 24, 2014

ok, sent :)

@mceyzar
Copy link
Author

mceyzar commented Nov 24, 2014

let me know if i can be of any assistance

thomasjammet added a commit that referenced this issue Nov 26, 2014
…ertion to avoid crashes.

 - Correction of LUAXML::Index, a key not found was returning the key itself (may cause an infinite loop with ipairs)
 - Added a test of ipairs(mona:fromXML(...))
 - Added tests RTMPLoad and RTMFPLoad to test several successive connections
 - Deleting directories data and www from UnitTests, duplicate
@thomasjammet
Copy link
Contributor

I've commited a correction for your issue, can you confirm that the problem is resolved?

Thank you for your assistance!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants