[OmniOS-discuss] getgrnam_r hangs if buffer too small

Dan McDonald danmcd at omniti.com
Thu Jan 22 20:58:27 UTC 2015


> On Jan 22, 2015, at 3:11 PM, Nathan Huff <nrhuff at umn.edu> wrote:
> 
> I am running 151006 and we have some very large groups.  If the buffer passed to getgrnam_r is too small to fit the group entry it seems to just hang.  I think it is supposed to return NULL and set errno to ERANGE.  If the buffer is big enough it returns the information fine.

When your process hangs (assuming it's easily reproducible) could you utter:

	pstack <PID-of-hung-process>

and share the stack with the list, please?

And for bonus points, take a core dump of it as well:

	gcore <PID-of-hung-process>

I *suspect* this affects all OmniOS versions.  The code in question is quite old, with last-changes predating illumos itself.

Thanks!
Dan



More information about the OmniOS-discuss mailing list