hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Patrick McCabe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-11638) OpensslSecureRandom.c pthreads_thread_id should support FreeBSD and Solaris in addition to Linux
Date Mon, 09 Mar 2015 19:57:40 GMT

    [ https://issues.apache.org/jira/browse/HADOOP-11638?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14353479#comment-14353479
] 

Colin Patrick McCabe commented on HADOOP-11638:
-----------------------------------------------

Thanks for that clarification, [~dankm].  That sounds like an internal implementation issue
of the {{pthread_getthreadid_np}} function on FreeBSD and possibly even a kernel-level detail.
 If FreeBSD later supplies an API for getting longer numeric thread IDs than 32-bits, we can
think about switching over to it then.  But for now we have to use the OS-provided API that
exists.

Committed to 2.7.  Thanks, all.

> OpensslSecureRandom.c pthreads_thread_id should support FreeBSD and Solaris in addition
to Linux
> ------------------------------------------------------------------------------------------------
>
>                 Key: HADOOP-11638
>                 URL: https://issues.apache.org/jira/browse/HADOOP-11638
>             Project: Hadoop Common
>          Issue Type: Bug
>          Components: native
>    Affects Versions: 2.6.0
>            Reporter: Dmitry Sivachenko
>            Assignee: Kiran Kumar M R
>              Labels: freebsd
>         Attachments: HADOOP-11638-001.patch, HADOOP-11638-002.patch, HADOOP-11638-003.patch
>
>
> In OpensslSecureRandom.c you use Linux-specific syscall gettid():
> static unsigned long pthreads_thread_id(void)
> {
> return (unsigned long)syscall(SYS_gettid);
> }
> Man page says:
> gettid()  is Linux-specific and should not be used in programs that are
> intended to be portable.
> This breaks hadoop-2.6.0 compilation on FreeBSD (may be on other OSes too).



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message