ACK, b.t.w Mathi.
> -----Original Message----- > From: Mathivanan Naickan Palanivelu > Sent: Thursday, May 26, 2016 1:20 PM > To: Vu Minh Nguyen; lennart.l...@ericsson.com > Cc: opensaf-devel@lists.sourceforge.net > Subject: Re: [devel] [PATCH 1 of 1] log: fix log file sizes grow rapidly and > cannot open [#1851] > > Is the problem (i.e. escalation of offset to a big value) dependent on > machine(arch/toolchain) or is it observed on all machines(always)? > > Mathi. > > > > -----Original Message----- > > From: Mathivanan Naickan Palanivelu [mailto:mathi.naic...@oracle.com] > > Sent: Thursday, May 26, 2016 1:16 PM > > To: 'Vu Minh Nguyen'; 'lennart.l...@ericsson.com' > > Cc: 'opensaf-devel@lists.sourceforge.net' > > Subject: RE: [PATCH 1 of 1] log: fix log file sizes grow rapidly and > > cannot open [#1851] > > > > Hi Vu, > > > > Would you be knowing the steps to reproduce this problem? > > > > Thanks, > > Mathi. > > > > > -----Original Message----- > > > From: Vu Minh Nguyen [mailto:vu.m.ngu...@dektech.com.au] > > > Sent: Thursday, May 26, 2016 7:48 AM > > > To: Mathivanan Naickan Palanivelu; lennart.l...@ericsson.com > > > Cc: opensaf-devel@lists.sourceforge.net > > > Subject: [PATCH 1 of 1] log: fix log file sizes grow rapidly and > > > cannot open [#1851] > > > > > > osaf/services/saf/logsv/lgs/lgs_filehdl.cc | 5 ++--- > > > 1 files changed, 2 insertions(+), 3 deletions(-) > > > > > > > > > Not convert `offset` data to `off_t` when passing to `lseek`, > > > causing the `offset` value is an big big number. > > > > > > This patch does convert `offset` value to `off_t` type. > > > > > > diff --git a/osaf/services/saf/logsv/lgs/lgs_filehdl.cc > > > b/osaf/services/saf/logsv/lgs/lgs_filehdl.cc > > > --- a/osaf/services/saf/logsv/lgs/lgs_filehdl.cc > > > +++ b/osaf/services/saf/logsv/lgs/lgs_filehdl.cc > > > @@ -263,7 +263,6 @@ int write_log_record_hdl(void *indata, v > > > if (bytes_written < params_in->record_size) > > > goto retry; > > > } > > > - > > > osaf_mutex_lock_ordie(&lgs_ftcom_mutex); /* LOCK after critical > > > section */ > > > > > > /* If the thread was hanging and has timed out and the log record > > > was @@ -271,8 +270,8 @@ int write_log_record_hdl(void *indata, v > > > * returned SA_AIS_TRY_AGAIN). > > > */ > > > if (*timeout_f == true) { > > > - TRACE("Timeout, removing last log record"); > > > - file_length = lseek(params_in->fd, -bytes_written, > > > SEEK_END); > > > + LOG_NO("Timeout, removing last log record"); > > > + file_length = lseek(params_in->fd, -((off_t)bytes_written), > > > +SEEK_END); > > > if (file_length != -1) { > > > do { > > > rc = ftruncate(params_in->fd, file_length); > > ------------------------------------------------------------------------------ > Mobile security can be enabling, not merely restricting. Employees who bring > their own devices (BYOD) to work are irked by the imposition of MDM > restrictions. Mobile Device Manager Plus allows you to control only the apps > on BYO-devices by containerizing them, leaving personal data untouched! > https://ad.doubleclick.net/ddm/clk/304595813;131938128;j > _______________________________________________ > Opensaf-devel mailing list > Opensaf-devel@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/opensaf-devel ------------------------------------------------------------------------------ Mobile security can be enabling, not merely restricting. Employees who bring their own devices (BYOD) to work are irked by the imposition of MDM restrictions. Mobile Device Manager Plus allows you to control only the apps on BYO-devices by containerizing them, leaving personal data untouched! https://ad.doubleclick.net/ddm/clk/304595813;131938128;j _______________________________________________ Opensaf-devel mailing list Opensaf-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/opensaf-devel