Bug 544022

Summary: strftime used in logsys.c is not thread safe
Product: [Fedora] Fedora Reporter: Steven Dake <sdake>
Component: corosyncAssignee: Jan Friesse <jfriesse>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: rawhideCC: agk, fdinitto, sdake
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-08 14:37:30 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch removing strftime with ISO time format output
none
Mostly same patch, but output is similar to current output none

Description Steven Dake 2009-12-03 17:56:21 UTC
Description of problem:
Posix requires strftime to be thread safe according to the specification.  Unfortunately the implementation of strftime in libc uses getenv, which according to Posix spec is not thread safe.  Please rework the usage of strftime to some other API which does not use getenv.

Version-Release number of selected component (if applicable):
corosync-1.1.2

How reproducible:


Steps to Reproduce:
1. may only occur on debian 
2. turn on timestamps
3. run code
  
Actual results:
http://marc.info/?l=openais&m=125785302203928&w=2

Expected results:
no segfualt

Additional info:

Comment 1 Jan Friesse 2009-12-04 11:06:19 UTC
Created attachment 376057 [details]
Patch removing strftime with ISO time format output

Comment 2 Jan Friesse 2009-12-04 11:07:00 UTC
Created attachment 376058 [details]
Mostly same patch, but output is similar to current output

Comment 3 Jan Friesse 2009-12-08 14:37:30 UTC
Second patch is now included in upstream. I hope it solves problem and closing bug