-
-
Notifications
You must be signed in to change notification settings - Fork 5.4k
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
SRS crash caused the operating system to shut down other programs. #536
Comments
I didn't understand where in the log it says that the SRS crash caused the closure of other programs.
|
I also didn't understand this. It's just that at some point we suddenly discovered that all the services on the server were shut down. After observing /var/log/messages, we found that SRS crashed. I have encountered SRS crashes before, but not like this time, where other services on the system were also shut down at the same time. I apologize, "
|
This is impossible, you can check its logs if other services are closed. Linux is not that weak.
|
Can you paste the stack of the crashed core of srs? I can check this issue.
|
I'm not sure how to check this. I only have this dump file, which has been placed in the Baidu Cloud Drive linked at the beginning. Do you need me to compile a debug version and try to reproduce this issue? By the way, is there a method to save a stream as an mp4 file?
|
The compiled version is by default a debug version, and with the core file, you can know where the crash occurred.
|
Can you please inform me how to set up SRS to generate a core dump file when it crashes? Will it not generate if it is started in non-daemon mode?
|
Search for core dump on Baidu, it's a standard for Linux programs, and it's available after setting environment variables.
|
Core was generated by `./objs/srs -c ./conf/srs.conf'. The above is the result after using 'gdb ./objs/srs core.23738'.
|
After checking the source code.
Discovered corresponding log: pid = -1 Is the program crashing due to the pid?
|
I added a log output at the location of ffmpeg->stop.
Line 128 is ffmpeg->stop.
The second line of the log to the last line is the log between the two ffmpeg->stops. It can be seen that the program crashed while executing the second ffmpeg->stop. After reviewing the code for srs_kill_forced, I do not have the ability to continue debugging and find the specific cause of the error.
|
Killing pid 0 or -1 is abnormal. The SRS function that kills processes will check the pid, and it will not kill if it is <=0.
Your log says:
And errno=10 means:
The two stops are for different FFMPEG calls. However, ignore kill pid=0, this pid only exists in the child process, and in the parent process, it is not possible for pid to be 0 unless the object has already been released. The execution path is as follows:
One thing that is certain is that there is a problem: encoder-150 and 151 both have the same pid 24160, which doesn't make sense.
|
Only when Do you have a reload? It seems that the possibility of reload causing this is the highest, and the previous
|
Source competition condition, I have opened a new bug: #742.
|
I have temporarily closed this bug as it might be caused by the 'fly fd'. If you can provide the steps to reproduce it, I will reopen it. Currently, I am unable to reproduce it on my end.
|
http://pan.baidu.com/s/1ntq3tzV
This is the SRS and dump files.
At a certain moment during testing of live streaming, (due to a mistake, I am trying hard to reproduce it), SRS crashed and caused CentOS to shut down other programs on the server (such as MySQL, PHP, etc.).
Below is a part of /var/log/messages.
Below is my configuration file. The key point is that I added the engine mp to save the live stream as an MP4 file.
TRANS_BY_GPT3
The text was updated successfully, but these errors were encountered: