What happens. When I start Hiawatha as a daemon with service start hiawatha and login to tomahawk all goes well. I can run commands etc.
At the moment I load a page with my browser hiawatha crashes.
So I've followed your valgrind instruction but fore some reason
hiawatha does not crash with the same actions performed.
Only when start via service start hiawatha it crashes when logged in on tomahawk and loading a page.
Anyway here is the output of valgrind:
==18163== Memcheck, a memory error detector
==18163== Copyright (C) 2002-2010, and GNU GPL'd, by Julian Seward et al.
==18163== Using Valgrind-3.6.0.SVN-Debian and LibVEX; rerun with -h for copyright info
==18163== Command: hiawatha -d
==18163==
==18163== Invalid write of size 2
==18163== at 0x80553D3: run_server (hiawatha.c:1931)
==18163== by 0x805591C: main (hiawatha.c:2086)
==18163== Address 0x43c1334 is 0 bytes after a block of size 20 alloc'd
==18163== at 0x4023F50: malloc (vg_replace_malloc.c:236)
==18163== by 0x805534E: run_server (hiawatha.c:1894)
==18163== by 0x805591C: main (hiawatha.c:2086)
==18163==
==18163== Syscall param poll(ufds.events) points to unaddressable byte(s)
==18163== at 0x42FC9A6: poll (poll.c:87)
==18163== by 0x8055416: run_server (hiawatha.c:1939)
==18163== by 0x805591C: main (hiawatha.c:2086)
==18163== Address 0x43c1334 is 0 bytes after a block of size 20 alloc'd
==18163== at 0x4023F50: malloc (vg_replace_malloc.c:236)
==18163== by 0x805534E: run_server (hiawatha.c:1894)
==18163== by 0x805591C: main (hiawatha.c:2086)
==18163==
==18163== Syscall param poll(ufds.reventss) points to unaddressable byte(s)
==18163== at 0x42FC9A6: poll (poll.c:87)
==18163== by 0x8055416: run_server (hiawatha.c:1939)
==18163== by 0x805591C: main (hiawatha.c:2086)
==18163== Address 0x43c1336 is 2 bytes after a block of size 20 alloc'd
==18163== at 0x4023F50: malloc (vg_replace_malloc.c:236)
==18163== by 0x805534E: run_server (hiawatha.c:1894)
==18163== by 0x805591C: main (hiawatha.c:2086)
==18163==
==18163==
==18163== HEAP SUMMARY:
==18163== in use at exit: 14,118 bytes in 470 blocks
==18163== total heap usage: 1,725 allocs, 1,255 frees, 444,633 bytes allocated
==18163==
==18163== 160 (40 direct, 120 indirect) bytes in 1 blocks are definitely lost in loss record 89 of 107
==18163== at 0x4023F50: malloc (vg_replace_malloc.c:236)
==18163== by 0x431ADD3: nss_parse_service_list (nsswitch.c:622)
==18163== by 0x431B516: __nss_database_lookup (nsswitch.c:164)
==18163== by 0x47B6EAB: ???
==18163== by 0x47B7F84: ???
==18163== by 0x42D4334: getpwnam_r@@GLIBC_2.1.2 (getXXbyYY_r.c:253)
==18163== by 0x42D3D9E: getpwnam (getXXbyYY.c:117)
==18163== by 0x806973E: parse_userid (userconfig.c:36)
==18163== by 0x8062B99: read_main_configfile (serverconfig.c:955)
==18163== by 0x80549D9: run_server (hiawatha.c:1541)
==18163== by 0x805591C: main (hiawatha.c:2086)
==18163==
==18163== 160 (40 direct, 120 indirect) bytes in 1 blocks are definitely lost in loss record 90 of 107
==18163== at 0x4023F50: malloc (vg_replace_malloc.c:236)
==18163== by 0x431ADD3: nss_parse_service_list (nsswitch.c:622)
==18163== by 0x431B516: __nss_database_lookup (nsswitch.c:164)
==18163== by 0x47B5F2B: ???
==18163== by 0x47B6E34: ???
==18163== by 0x431BC21: __nss_getent_r (getnssent_r.c:171)
==18163== by 0x42D2C95: getgrent_r@@GLIBC_2.1.2 (getXXent_r.c:162)
==18163== by 0x431B81A: __nss_getent (getnssent.c:38)
==18163== by 0x42D2679: getgrent (getXXent.c:84)
==18163== by 0x80694D4: lookup_group_ids (userconfig.c:144)
==18163== by 0x8062CF8: read_main_configfile (serverconfig.c:961)
==18163== by 0x80549D9: run_server (hiawatha.c:1541)
==18163==
==18163== 6,221 (264 direct, 5,957 indirect) bytes in 1 blocks are definitely lost in loss record 107 of 107
==18163== at 0x4023F50: malloc (vg_replace_malloc.c:236)
==18163== by 0x805F972: default_config (serverconfig.c:252)
==18163== by 0x80549A9: run_server (hiawatha.c:1534)
==18163== by 0x805591C: main (hiawatha.c:2086)
==18163==
==18163== LEAK SUMMARY:
==18163== definitely lost: 344 bytes in 3 blocks
==18163== indirectly lost: 6,197 bytes in 335 blocks
==18163== possibly lost: 0 bytes in 0 blocks
==18163== still reachable: 7,577 bytes in 132 blocks
==18163== suppressed: 0 bytes in 0 blocks
==18163== Reachable blocks (those to which a pointer was found) are not shown.
==18163== To see them, rerun with: --leak-check=full --show-reachable=yes
==18163==
==18163== For counts of detected and suppressed errors, rerun with: -v
==18163== ERROR SUMMARY: 258 errors from 6 contexts (suppressed: 39 from 10)