- **status**: review --> fixed
- **assigned_to**: Canh Truong -->  nobody 
- **Comment**:

changeset:   8445:7a408fc7ff8b
tag:         tip
parent:      8442:f4c509237589
user:        Canh Van Truong <[email protected]>
date:        Wed Dec 14 08:14:13 2016 +0700
summary:     log: fix bad file discriptor error when changing imm attributes 
[#2215]

changeset:   8444:9874533d7279
branch:      opensaf-5.1.x
parent:      8439:62a68f4fb03a
user:        Canh Van Truong <[email protected]>
date:        Wed Dec 14 08:14:13 2016 +0700
summary:     log: fix bad file discriptor error when changing imm attributes 
[#2215]

changeset:   8443:f11104b4c6b8
branch:      opensaf-5.0.x
parent:      8438:5fba82ddf21f
user:        Canh Van Truong <[email protected]>
date:        Wed Dec 14 08:14:13 2016 +0700
summary:     log: fix bad file discriptor error when changing imm attributes 
[#2215]




---

** [tickets:#2215] log: write_log_record_hdl, fileclose_hdl get bad file 
descriptor**

**Status:** fixed
**Milestone:** 5.0.2
**Created:** Fri Dec 02, 2016 10:52 AM UTC by Vu Minh Nguyen
**Last Updated:** Wed Dec 07, 2016 09:21 AM UTC
**Owner:** nobody


Steps to procedure:
1) Modify `saLogstreamLogFileFormat` attribute  value
2) Modify `saLogstreamLogFileFormat` attribute value again
( Or write a log record to that log stream)

Here is what will happen in `IMM apply callback` at step (2):
a1) Close the old file
a2) Create the new file

If at step #a1 - close old file gets `TIMEOUT`, the main thread will give up 
creating new file at step #a2.
But note that, `TIMEOUT` means the closing the file is in progress handled by 
`log file handle` thread.

So, when going next with step #2 above, will get `bad file descriptor` as 
performing close on the file which is already closed.

Below is the syslog info:

> Dec  2 14:06:28 SC-1 local0.notice osaflogd[458]: NO log_stream log file 
> close  FAILED: Connection timed out
> Dec  2 14:06:28 SC-1 local0.err osaflogd[458]: ER log_stream_config_change 
> failed: -1
> Dec  2 14:06:28 SC-1 local0.notice osafimmnd[445]: NO Ccb 4 COMMITTED 
> (immcfg_SC-1_740)
> Dec  2 14:06:29 SC-1 local0.notice osafimmnd[445]: NO Ccb 5 COMMITTED 
> (immcfg_SC-1_752)
> Dec  2 14:06:29 SC-1 local0.notice osaflogd[458]: NO log_stream log file 
> close  FAILED: Connection timed out
> Dec  2 14:06:29 SC-1 local0.err osaflogd[458]: ER log_stream_config_change 
> failed: -1
> Dec  2 14:06:29 SC-1 local0.notice osafimmnd[445]: NO Ccb 6 COMMITTED 
> (immcfg_SC-1_760)
> Dec  2 14:06:30 SC-1 local0.notice osaflogd[458]: NO fileclose_hdl: 
> fdatasync() error "Bad file descriptor"
> Dec  2 14:06:30 SC-1 local0.err osaflogd[458]: ER fileclose() Bad file 
> descriptor
> Dec  2 14:06:30 SC-1 local0.notice osaflogd[458]: NO log_stream log file 
> close  FAILED: Success
> Dec  2 14:06:30 SC-1 local0.err osaflogd[458]: ER log_stream_config_change 
> failed: -1
> Dec  2 14:06:30 SC-1 local0.err osaflogd[458]: ER write_log_record_hdl - 
> write FAILED: Bad file descriptor
> Dec  2 14:06:30 SC-1 local0.notice osaflogd[458]: NO fileclose_hdl: 
> fdatasync() error "Bad file descriptor"
> Dec  2 14:06:30 SC-1 local0.err osaflogd[458]: ER fileclose() Bad file 
> descriptor
> Dec  2 14:06:30 SC-1 local0.notice osaflogd[458]: NO fileclose failed Success
> 


---

Sent from sourceforge.net because [email protected] is 
subscribed to https://sourceforge.net/p/opensaf/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/opensaf/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
Opensaf-tickets mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensaf-tickets

Reply via email to