July 17th, 2017, 11:42 AM
-
Customised Beanstalk Memory Crash
My changes are working as designed however, it crashes out if you enter a tube name above 12 characters.
If this is a new tube name then create a new announce tube using -A name
https://github.com/BiGMiCR0/beanstal...77e3061dabd4f5
Have been trying to write unit tests for this as well with no success or a fix does anyone have any idea what I have done wrong.
==15169== Command: ./beanstalkd -A testtubename
==15169==
==15169== Invalid write of size 1
==15169== at 0x4C3275B: memcpy@@GLIBC_2.14 (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15169== by 0x40962E: dispatch_cmd (prot.c:1550)
==15169== by 0x409D65: do_cmd (prot.c:1678)
==15169== by 0x409EFF: conn_data (prot.c:1718)
==15169== by 0x40A46E: h_conn (prot.c:1860)
==15169== by 0x40A520: prothandle (prot.c:1872)
==15169== by 0x40BC98: srvserve (serv.c:56)
==15169== by 0x40DCE1: main (main.c:91)
==15169== Address 0x52090aa is 0 bytes after a block of size 186 alloc'd
==15169== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==15169== by 0x4043A1: allocate_job (job.c:97)
==15169== by 0x40444B: make_job_with_id (job.c:113)
==15169== by 0x409591: dispatch_cmd (prot.c:1549)
==15169== by 0x409D65: do_cmd (prot.c:1678)
==15169== by 0x409EFF: conn_data (prot.c:1718)
==15169== by 0x40A46E: h_conn (prot.c:1860)
==15169== by 0x40A520: prothandle (prot.c:1872)
==15169== by 0x40BC98: srvserve (serv.c:56)
==15169== by 0x40DCE1: main (main.c:91)
==15169==
Thanks in advance for any reply's.
July 17th, 2017, 02:17 PM
-
Your primes are all prime.
Your description of the program
Beanstalk is a simple, fast work queue.
Its interface is generic, but was originally designed for reducing the latency of page views in high-volume web applications by running time-consuming tasks asynchronously.
is meaningless to me.
I was unable to recreate a problem. (runs terminated with ^C)
Code:
$ ./beanstalkd -A testtubename
$ ./beanstalkd -A test
the
blort
q
$
[code]
Code tags[/code] are essential for python code and Makefiles!
July 18th, 2017, 01:33 AM
-
July 18th, 2017, 10:32 AM
-
[code]
Code tags[/code] are essential for python code and Makefiles!