On Mon, 02 Mar 2015 08:15:12 +, Kagamin wrote:
On Saturday, 28 February 2015 at 05:32:51 UTC, ketmar wrote:
On Sat, 28 Feb 2015 06:09:16 +0100, Martin Nowak wrote:
Meanwhile the author of daemonized came up with another idea, using
exec instead of fork.
On Saturday, 28 February 2015 at 05:32:51 UTC, ketmar wrote:
On Sat, 28 Feb 2015 06:09:16 +0100, Martin Nowak wrote:
Meanwhile the author of daemonized came up with another idea,
using exec
instead of fork. https://github.com/NCrashed/daemonize/issues/2
ahem.
I mean, if it used GC after fork, like in bug 6846, that would be
untidy (it's complicated because GC is always a temptation).
On Sat, 28 Feb 2015 06:09:16 +0100, Martin Nowak wrote:
Meanwhile the author of daemonized came up with another idea, using exec
instead of fork. https://github.com/NCrashed/daemonize/issues/2
ahem. http://forum.dlang.org/post/mc35ap$2dvo$5...@digitalmars.com
signature.asc
Description: PGP
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 02/18/2015 09:27 PM, Byron Heads wrote:
I have a medium size daemon application that uses several threads,
libasync, and daemonize. On windows it runs correctly with GC
enabled, but on linux the GC causes a deadlock while allocating
memory.
I think, it's better to diagnose, what problem the program
encounters, than to explain, what happens in kernel and glibc.
The first step is to see, where it hangs and get a stacktrace.
On Thursday, 19 February 2015 at 22:12:03 UTC, Steven
Schveighoffer wrote:
I'm not sure what the issue here is, but I don't think forking
is as unstable as you seem to think, or maybe I'm reading this
wrong. I can agree there are many gotchas with forking.
You need to very carefully configure
On Fri, 20 Feb 2015 09:04:29 +, Ola Fosheim Grøstad wrote:
If you fork early in the process'
lifespan, before acquiring resources, then it is much easier...
and even if `fork()` is the first line of code in `main()`, there cannot
be any guarantees. there can be module constructor doing
On Fri, 20 Feb 2015 08:03:00 +, Kagamin wrote:
I think, it's better to diagnose, what problem the program encounters,
than to explain, what happens in kernel and glibc.
The first step is to see, where it hangs and get a stacktrace.
this way of thinking is exactly why i recommend to avoid
On Wednesday, 18 February 2015 at 20:27:08 UTC, Byron Heads wrote:
Adding core.memory.GC.disable; to main causes the application to
work correctly (and quickly till it runs out of memory :D )
GC.disable shouldn't run OOM, BTW.
http://dlang.org/phobos/core_memory.html#.GC.disable
On Wednesday, 18 February 2015 at 20:41:12 UTC, Dicebot wrote:
Any chance you are using gdm-3.12.x?
I was so mad when I have encountered this:
https://issues.dlang.org/show_bug.cgi?id=4890
Indeed, maybe
http://dlang.org/phobos-prerelease/core_thread.html#.thread_setGCSignals
might help.
We
On Wednesday, 18 February 2015 at 20:27:08 UTC, Byron Heads wrote:
I have a medium size daemon application that uses several
threads, libasync, and daemonize. On windows it runs correctly
with GC enabled, but on linux the GC causes a deadlock while
allocating memory.
Can you reliably
On Friday, 20 February 2015 at 12:47:58 UTC, ketmar wrote:
3rd party library that already initialized something, or... you
got the idea. ;-)
Yeah, either use plain C or avoid 3rd party libraries... I guess
that includes phobos ;)
On Wednesday, 18 February 2015 at 20:27:08 UTC, Byron Heads wrote:
System:
DMD 2.066.1
Can you also try the latest beta please, maybe we already fixed
something.
http://forum.dlang.org/post/54e49e2d.2010...@dawg.eu
On Fri, 20 Feb 2015 14:33:29 +, Ola Fosheim Grøstad wrote:
On Friday, 20 February 2015 at 12:47:58 UTC, ketmar wrote:
3rd party library that already initialized something, or... you got the
idea. ;-)
Yeah, either use plain C or avoid 3rd party libraries... I guess that
includes phobos
On Friday, 20 February 2015 at 14:33:31 UTC, Ola Fosheim Grøstad
wrote:
Yeah, either use plain C or avoid 3rd party libraries... I
guess that includes phobos ;)
AFAIK, in early days of unix there were no threads, processes
were single-threaded, fork was the way to concurrency and exec
was
On Friday, 20 February 2015 at 22:07:56 UTC, Kagamin wrote:
AFAIK, in early days of unix there were no threads, processes
were single-threaded, fork was the way to concurrency and exec
was the most efficient way to run a program in
memory-constrained conditions of 70s (kbytes of RAM!). Plain
On Friday, 20 February 2015 at 15:17:22 UTC, Martin Nowak wrote:
Might want to try using libasync without multiple threads.
http://www.linuxprogrammingblog.com/threads-and-fork-think-twice-before-using-them
Or you temporarily disable the GC before forking and enable it
again afterwards.
On 02/18/2015 09:35 PM, Byron Heads wrote:
I am in the daemonize library
https://github.com/NCrashed/daemonize
Might want to try using libasync without multiple threads.
http://www.linuxprogrammingblog.com/threads-and-fork-think-twice-before-using-them
On Fri, 20 Feb 2015 22:29:04 +, Ola Fosheim Grøstad wrote:
This robust philosophy somehow got lost in the quest for bleeding edge.
i still missing it. sure, we can write our code in this style today, but
with all that libraries that can create threads without you knowing about
it (heh,
On 2/19/15 12:01 PM, ketmar wrote:
On Thu, 19 Feb 2015 16:33:58 +, Byron Heads wrote:
Now I am not sure. This code runs correctly:
as i told you before, `fork()` is hard. you can experiment for monthes
seeing strange bugs here and there, and seeing no bugs, and strange bugs,
and...
On Wednesday, 18 February 2015 at 21:21:11 UTC, Byron Heads wrote:
On Wednesday, 18 February 2015 at 21:05:10 UTC, Byron Heads
wrote:
On Wednesday, 18 February 2015 at 20:55:56 UTC, ketmar wrote:
On Wed, 18 Feb 2015 20:35:44 +, Byron Heads wrote:
On Wednesday, 18 February 2015 at
On Thu, 19 Feb 2015 16:33:58 +, Byron Heads wrote:
Now I am not sure. This code runs correctly:
as i told you before, `fork()` is hard. you can experiment for monthes
seeing strange bugs here and there, and seeing no bugs, and strange bugs,
and...
there are alot of things going on under
On Thu, 19 Feb 2015 17:12:02 -0500, Steven Schveighoffer wrote:
On 2/19/15 12:01 PM, ketmar wrote:
On Thu, 19 Feb 2015 16:33:58 +, Byron Heads wrote:
Now I am not sure. This code runs correctly:
as i told you before, `fork()` is hard. you can experiment for monthes
seeing strange bugs
On Wednesday, 18 February 2015 at 21:05:10 UTC, Byron Heads wrote:
On Wednesday, 18 February 2015 at 20:55:56 UTC, ketmar wrote:
On Wed, 18 Feb 2015 20:35:44 +, Byron Heads wrote:
On Wednesday, 18 February 2015 at 20:33:40 UTC, ketmar wrote:
On Wed, 18 Feb 2015 20:27:07 +, Byron
On Wednesday, 18 February 2015 at 21:21:11 UTC, Byron Heads wrote:
On Wednesday, 18 February 2015 at 21:05:10 UTC, Byron Heads
wrote:
On Wednesday, 18 February 2015 at 20:55:56 UTC, ketmar wrote:
On Wed, 18 Feb 2015 20:35:44 +, Byron Heads wrote:
On Wednesday, 18 February 2015 at
On Wednesday, 18 February 2015 at 20:33:40 UTC, ketmar wrote:
On Wed, 18 Feb 2015 20:27:07 +, Byron Heads wrote:
are you forking? ;-)
I am in the daemonize library
https://github.com/NCrashed/daemonize
On Wednesday, 18 February 2015 at 20:41:12 UTC, Dicebot wrote:
Any chance you are using gdm-3.12.x?
I was so mad when I have encountered this:
https://issues.dlang.org/show_bug.cgi?id=4890
Dont think so
$dpkg --get-selections | grep gdm doesn't return anything
also running via ssh
On Wed, 18 Feb 2015 20:27:07 +, Byron Heads wrote:
are you forking? ;-)
signature.asc
Description: PGP signature
Any chance you are using gdm-3.12.x?
I was so mad when I have encountered this:
https://issues.dlang.org/show_bug.cgi?id=4890
On Wed, 18 Feb 2015 20:35:44 +, Byron Heads wrote:
On Wednesday, 18 February 2015 at 20:33:40 UTC, ketmar wrote:
On Wed, 18 Feb 2015 20:27:07 +, Byron Heads wrote:
are you forking? ;-)
I am in the daemonize library
https://github.com/NCrashed/daemonize
can you drop that and
On Wed, 18 Feb 2015 20:35:44 +, Byron Heads wrote:
On Wednesday, 18 February 2015 at 20:33:40 UTC, ketmar wrote:
On Wed, 18 Feb 2015 20:27:07 +, Byron Heads wrote:
are you forking? ;-)
I am in the daemonize library
https://github.com/NCrashed/daemonize
p.s. and check if you
On Wednesday, 18 February 2015 at 20:55:56 UTC, ketmar wrote:
On Wed, 18 Feb 2015 20:35:44 +, Byron Heads wrote:
On Wednesday, 18 February 2015 at 20:33:40 UTC, ketmar wrote:
On Wed, 18 Feb 2015 20:27:07 +, Byron Heads wrote:
are you forking? ;-)
I am in the daemonize library
On Wed, 18 Feb 2015 21:21:10 +, Byron Heads wrote:
My guess is this is going to be related to forking, going to see if I
can make a test case.
it's better to avoid forking at all. it's *very* hard to do forking
right, it's almost impossible to do it right even in single-threaded app,
and
On Wed, 18 Feb 2015 21:21:10 +, Byron Heads wrote:
p.s. if you really-really-really need to avoid shell scripts, you can
`exec` your program with STDIN, STDOUT and STDERR redirected to /dev/
null, passing some special argument to it. i.e. it shouldn't fork, just
exec itself again with added
35 matches
Mail list logo