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

[1.x] Segmentation Fault in janus_log_getbuf() at log.c #3427

Open
Ajitshiva opened this issue Sep 17, 2024 · 4 comments
Open

[1.x] Segmentation Fault in janus_log_getbuf() at log.c #3427

Ajitshiva opened this issue Sep 17, 2024 · 4 comments
Labels
multistream Related to Janus 1.x pr-exists

Comments

@Ajitshiva
Copy link

What version of Janus is this happening on?
Latest

Have you tested a more recent version of Janus too?
Yes

Was this working before?
This is the first time I am facing this crash for the past 2 years.

Is there a gdb or libasan trace of the issue?
https://pastebin.com/BWjE7SMv

Additional context

static janus_log_buffer *janus_log_getbuf(void) {
        /*** some code  ***/
	if (b == NULL) {
		b = g_malloc(INITIAL_BUFSZ + sizeof(*b));
		// we are suspecting before b->allocated set to INITIAL_BUFSZ, b set to NULL by other thread.
		b->allocated = INITIAL_BUFSZ;
		b->next = NULL;
	}
	return b;
}

@lminiero @ramprakash110109

@Ajitshiva Ajitshiva added the multistream Related to Janus 1.x label Sep 17, 2024
@Ajitshiva Ajitshiva changed the title [1.x] Segment Fault in janus_log_getbuf() at log.c [1.x] Segmentation Fault in janus_log_getbuf() at log.c Sep 17, 2024
@atoppi
Copy link
Member

atoppi commented Sep 17, 2024

The process was aborted due to a malloc failure.

  1. Are you running a customized version of the server?
  2. Can you provide some details about the environment (Linux distro, standard lib etc.) ?
  3. Run Janus with sanitizers enabled

@Ajitshiva
Copy link
Author

  1. Yes we have done very very minimal customization. But those changes should not affect the log.c malloc part.
  2. Environment is AWS instance (Debian 12 bookworm OS)
  3. I will try to Run Janus with sanitizers enabled

@lminiero
Copy link
Member

@Ajitshiva we actually decided to change the way logging is performed, since it was long overdue. Please test the new PR instead.

@lminiero
Copy link
Member

lminiero commented Oct 4, 2024

@Ajitshiva any feedback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
multistream Related to Janus 1.x pr-exists
Projects
None yet
Development

No branches or pull requests

3 participants