msync - can someone shed some light please?
Julien ÉLIE
julien at trigofacile.com
Thu Jun 12 22:19:41 UTC 2025
Hi Chris,
> When adding groups (ctlinnd newgroup…), the following occurs:
>
> 2025-06-12T14:14:57.572314+02:00 nntpspool innd: SERVER msync failed /var/lib/news/active 0x0x7f3f46800000 5062656 Cannot allocate memory
>
> Inn refuses to start up, until I literally remove 1 line from my active
> file. As soon as I add them again, the issue reoccurs. The name of the
> group being added/removed is of no consequence, the issue is about the
> amount of groups – that is what is getting me here, I completely fail to
> understand how inn can’t start up with ~107K groups in the active file.
>
> root at nntpspool ~ # cat /var/lib/news/active|wc -l
> 107411
>
> INN 2.7.3
What operating system are you using?
Do you build from sources? If that is the case, may you try to change
in lib/mmap.c:
char *start = (char *) ((uintptr_t) p & mask);
char *end = (char *) (((uintptr_t) p + length + pagesize) & mask);
to:
char *start = (char *) ((size_t) p & mask);
char *end = (char *) (((size_t) p + length + pagesize) & mask);
It is the only recent change (in 2023) in the code dealing with
mmap/msync. Though I am unsure it would solve the memory allocation
issue, it may be the first thing to test.
Otherwise, I am sorry I do not have any other clue right now.
The wanted allocation is 5,062,656 bytes according to the log, so it
should have worked on your server with 128 GB of RAM...
--
Julien ÉLIE
« On ne va jamais si loin que lorsque l'on ne sait pas où l'on va. »
More information about the inn-workers
mailing list