Bug 2790

Summary: syslogd dies if logfile reaches 2G-1 limit
Product: Sisyphus Reporter: Sir Raorn <raorn>
Component: syslogdAssignee: Alexey Gladkov <legion>
Status: CLOSED FIXED QA Contact:
Severity: blocker    
Priority: P3 CC: glebfm, ldv, legion
Version: unstable   
Hardware: all   
OS: Linux   

Description Sir Raorn 2003-07-29 16:59:57 MSD
Демон умирает по SIGXFSZ (File size limit exceeded) если один из его логфайлов разрастается до двух гигабайт (2147483647 байт). Файл открывается успешно, но попытка записи перерубается сигналом. После этого демон не стартует.

В случае когда файл больше 2G-1, open(2) возвращает EBIG и этот файл просто пропускается.

На файловой системе квот/ограничений нет (ext2/ext3, я лично создавал большие файлы). Кусок strace в Additional Information.
---

---
5033  select(47, [3 44 45 46], NULL, NULL, NULL) = 1 (in [44])
5033  recv(44, \&quot;&lt;134&gt;Jul 29 16:52:45 postgres[37\&quot;..., 1022, 0) = 75
5033  time([1059483165])                = 1059483165
5033  writev(39, [{\&quot;Jul 29 16:52:45\&quot;, 15}, {\&quot; \&quot;, 1}, {\&quot;namo\&quot;, 4}, {\&quot; \&quot;, 1}, {\&quot;postgres[3759]: [1410330] LOG:  \&quot;..., 54}, {\&quot;\\n\&quot;, 1}], 6) = 76
5033  writev(42, [{\&quot;Jul 29 16:52:45\&quot;, 15}, {\&quot; \&quot;, 1}, {\&quot;namo\&quot;, 4}, {\&quot; \&quot;, 1}, {\&quot;postgres[3759]: [1410330] LOG:  \&quot;..., 54}, {\&quot;\\n\&quot;, 1}], 6) = -1 EFBIG (File too large)
5033  --- SIGXFSZ (File size limit exceeded) @ 0 (0) ---
5033  +++ killed by SIGXFSZ +++
Comment 1 Dmitry V. Levin 2003-07-29 18:39:10 MSD
Try to recompile with
%add_optflags -D_FILE_OFFSET_BITS=64
line added in %build section.

It should work but I have no platform for test ATM.
Comment 2 Dmitry V. Levin 2003-07-29 18:39:10 MSD
Try to recompile with
%add_optflags -D_FILE_OFFSET_BITS=64
line added in %build section.

It should work but I have no platform for test ATM.
Comment 3 Sir Raorn 2003-07-30 11:22:48 MSD
%add_optflags -D_FILE_OFFSET_BITS=64 works just fine.

Security update would be nice ;-)
Comment 4 Sir Raorn 2003-07-30 11:22:48 MSD
%add_optflags -D_FILE_OFFSET_BITS=64 works just fine.

Security update would be nice ;-)
Comment 5 Dmitry V. Levin 2003-07-30 16:35:18 MSD
Fixed in sysklogd-1.4.1-alt15
Comment 6 Dmitry V. Levin 2003-07-30 16:35:18 MSD
Fixed in sysklogd-1.4.1-alt15
Comment 7 Dmitry V. Levin 2003-08-05 15:58:57 MSD
Fixed in errata.
Comment 8 Dmitry V. Levin 2003-08-05 15:58:57 MSD
Fixed in errata.