Skip to content

strace on zma gives "timer_gettime...(..).. = -1 EINVAL (Invalid argument)" #170

@raulcaj

Description

@raulcaj

Hi! I have a deploy of zoneminder which I have to reboot the server from time to time because some cams just stop working.
I did a strace on zma process and find out an error on the syscall 'timer_gettime", I noticed it is called on my system in these files:

zm_logger.cpp:32:#include <syscall.h>
zm_logger.cpp:522: if ( (tid = syscall(SYS_gettid)) < 0 ) // Thread/Process id
zm_thread.h:32: ThreadException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)syscall(224) ) )
zm_thread.h:205: return( (pid_t)syscall(224) );
zm_timer.h:33: TimerException( const std::string &message ) : Exception( stringtf( "(%d) "+message, (long int)syscall(224) ) )

On my system when it call (long int)syscall(224) it's calling timer_gettime, but I think it should be calling gettid instead.
Also, notice that the solution is already applied on zm_logger.cpp, just replace the constant 224 for the macro SYS_gettid.

Could you guys fix this?

Thanks

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