Skip to content

EulerOS 2.9 received sigsegv in function gettimeofday #18

@LoTmLumian

Description

@LoTmLumian

I also tested in EulerOS 2.0 and CentOS 8.2, never got that signal.

Jemalloc VERSION: 5.2.0
My MALLOC_CONF: --with-malloc-conf=background_thread:true
Running in VM,
Arch: x86 (64bits)
CPU: 1U
Memory: 1G
OS: EulerOS 2.9

GDB information:
image

File Line:
https://github.com/jemalloc/jemalloc/blob/5.2.0/src/background_thread.c#L261

if (config_stats) {
=>	gettimeofday(&tv, NULL);

GDB disassembly:
image
BTW, context of rax is 0.

I disassembled background_thread_sleep() and gettimeofday() in other machine with greater memory (16G), I never saw add %al, (%rax). Besides, this segfault never occurs in other machine.

dmesg info:
image

Probability: Very high on virtual machines with small memory, in EulerOS 2.9.
If there are segfaults, they always occur at the beginning of process running.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions