Eclipse using MinGW make fails without msys - eclipse

As background, I'm trying to build ChibiOS for STM32 on a Windows 8.1 host. This works perfectly well if I simply run make in the demo directory in the msys.bat command prompt. The toolchain and paths should thus be fine.
Now, if I simply set up an Eclipse project, it will try to run make.exe directly and fails. The output is similar to running make (either make.exe or mingw32-make.exe) from a plain cmd prompt.
make all
0 [main] sh 5524 sync_with_child: child 2444(0x188) died before initialization with status code 0xC0000142
22 [main] sh 5524 sync_with_child: *** child state waiting for longjmp
/usr/bin/sh: fork: Resource temporarily unavailable
0 [main] sh 188 sync_with_child: child 1152(0x188) died before initialization with status code 0xC0000142
26 [main] sh 188 sync_with_child: *** child state waiting for longjmp
/usr/bin/sh: fork: Resource temporarily unavailable
0 [main] sh 5096 sync_with_child: child 3200(0x18C) died before initialization with status code 0xC0000142
25 [main] sh 5096 sync_with_child: *** child state waiting for longjmp
/usr/bin/sh: fork: Resource temporarily unavailable
0 [main] sh 5232 sync_with_child: child 3820(0x184) died before initialization with status code 0xC0000142
25 [main] sh 5232 sync_with_child: *** child state waiting for longjmp
/usr/bin/sh: fork: Resource temporarily unavailable
make: Nothing to be done for 'all'.
20:39:33 Build Finished (took 4s.171ms)
I've seen some info saying this is some aspect of Windows 8.1. Can I convince Eclipse to use msys somehow or is there another known clean way to make a make (any make) work without it?
Possibly related:
http://forum.chibios.org/phpbb/viewtopic.php?p=16023
http://sourceforge.net/p/mingw/bugs/1013/?page=0

Bizarrely, the issue was solved for me by replacing msys-1.0.dll in WinAVR directory with the msys one. I'm guessing there is an ancient version there that somehow gets loaded while it's not in the system path as far as I can tell.
The links in the question refer to updating the dll or replacing it with a patched one.

Related

Windows issue when using pm2 deploy

I have read several issues and ideas on how to work with pm2 under a Windows machine, and believe it or not, my previous machine I had it working very well ... then I had to re.format it and completely forgot what I did before :(
and I've installed pm2 after npm and with the command: npm install pm2#latest -g
for deploying and under the windows command line (cmd) I do:
pm2 deploy production
but I always get:
--> Deploying to production environment
--> on host 10.200.73.136
Deploy failed
Deploy failed
if I use the git bash to run, I get weird git errors:
balex#DESKTOP-3LKNA7U /d/Gavekortet/gogift-mainsite (master)
$ pm2 deploy production
--> Deploying to production environment
--> on host 10.200.73.136
0 [main] sh 16020 C:\Program Files\Git\usr\bin\sh.exe: *** fatal error in forked process - fork: can't reserve memory for parent stack 0x600000 - 0x800000, (child has 0x400000 - 0x600000), Win32 error 487
660 [main] sh 16020 cygwin_exception::open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
0 [main] sh 13588 fork: child -1 - forked process 16020 died unexpectedly, retry 0, exit code 0x100, errno 11
sh: fork: retry: No child processes
1007561 [main] sh 8808 C:\Program Files\Git\usr\bin\sh.exe: *** fatal error in forked process - fork: can't reserve memory for parent stack 0x600000 - 0x800000, (child has 0x400000 - 0x600000), Win32 error 487
1008780 [main] sh 8808 cygwin_exception::open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
2266018 [main] sh 13588 fork: child -1 - forked process 8808 died unexpectedly, retry 0, exit code 0x100, errno 11
sh: fork: retry: No child processes
4274490 [main] sh 14924 C:\Program Files\Git\usr\bin\sh.exe: *** fatal error in forked process - fork: can't reserve memory for parent stack 0x600000 - 0x800000, (child has 0x400000 - 0x600000), Win32 error 487
4275199 [main] sh 14924 cygwin_exception::open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
5799995 [main] sh 13588 fork: child -1 - forked process 14924 died unexpectedly, retry 0, exit code 0x100, errno 11
sh: fork: retry: No child processes
9804559 [main] sh 6320 C:\Program Files\Git\usr\bin\sh.exe: *** fatal error in forked process - fork: can't reserve memory for parent stack 0x600000 - 0x800000, (child has 0x400000 - 0x600000), Win32 error 487
9804986 [main] sh 6320 cygwin_exception::open_stackdumpfile: Dumping stack trace to sh.exe.stackdump
11142795 [main] sh 13588 fork: child -1 - forked process 6320 died unexpectedly, retry 0, exit code 0x100, errno 11
sh: fork: retry: No child processes
Any idea what am I missing (that I did before and can't remember exactly what) :(
P.S. same steps on my Mac machine, works flawlessly
I had this same problem today. Make sure that you have the latest version of pm2 (2.4.0 at the time of writing) and Git Bash.

Git Bash unable to allocate heap in Windows 7 (32 bit)

I have installed Git 1.9.5 in my Windows 7 (32 bit) machine and it installed properly. I was able to clone and checkout working copy from the remote server without any trouble.
However whenever I open Git Bash it shows this error in the command prompt:
C:\Program Files\Git\bin\sh.exe: *** 1. unable to allocate heap
0x10060000, heap
_chunk_size 268435456, pid 8260, Win32 error 0
0 [main] sh.exe" 9072 sync_with_child: child 8260(0x1A4) died before
ini alization with status code 0x1 1547 [main] sh.exe" 9072
sync_with_child: *** child state waiting for longjump
sh.exe": fork: Resource temporarily unavailable
I get same error whenever I am trying to execute git pull command.
I tried to rebase the msys-1.0.dll file following this link but didn't help. Would be great if someone can help me sort it out.
Thanks in advance.

Errors running sh.exe in msysgit in windows XP

I'm having difficulties with msysgit in a windowXP 32 bit environment I would really appreciate some help with. In actual fact, I'm using SmartGit and love the program. However it fails to run both Save Stash and Clean Up. As I thought the problem was with SmartGit, I approached the developers for help. However, it turns out the problem with with msysgit.
The SmartGit I have uses msysgit 1.8.1.2 -preview20130201.
I have also installed Git-1.8.3-preview20130601 in a separate directory.
No matter which of the two versions SmartGit uses, the problems persists.
The message given by SmartGit upon trying to save a stash is:
0 [main] us 0 open_stackdumpfile: Dumping stack trace to us.stackdump
0 [main] sh.exe" 8776 sync_with_child: child 936(0x18C) died before initia
lization with status code 0xC0000005
85 [main] sh.exe" 8776 sync_with_child: *** child state waiting for longjmp
C:\Program Files\SmartGitHg 4.5\git/libexec/git-core\git-stash: fork: Resource t
emporarily unavailable
Clean Up generates the following message:
Clean Up: failed to run repack
0 [main] us 0 open_stackdumpfile: Dumping stack trace to us.stackdump
0 [main] sh.exe" 7236 sync_with_child: child 1236(0x988) died before
initialization with status code 0xC0000005
4811 [main] sh.exe" 7236 sync_with_child: *** child state waiting for longjmp
If I use the Git Gui directly (instead of SmartGit),to do the compression on the same repository, I get:
0 [main] sh.exe" 384 sync_with_child: child 7628(0x9A0) died before
initialization with status code 0xC0000005
1086 [main] sh.exe" 384 sync_with_child: *** child state waiting for longjmp
/usr/libexec/git-core/git-sh-setup: fork: Resource temporarily unavailable
If I try virtually anything with the Git Bash console, for example ls
sh.exe"-3.1$ ls
0 [main] us 0 open_stackdumpfile: Dumping stack trace to us.stackdump
68591127 [main] sh.exe" 712 sync_with_child: child 4772(0x1B4) died before initi
alization with status code 0xC0000005
68591227 [main] sh.exe" 712 sync_with_child: *** child state waiting for longjmp
sh.exe": fork: Resource temporarily unavailable
sh.exe"-3.1$
However, if I use Cygwin (git gc) on the repository, everything works fine.
I have done a web search and have found that other users have had similar error messages. The closest I found was:
Git sh.exe process forking issue on windows XP, slow?
But I don't believe that I have the same issue.
Any suggestions on what I could try would be greatly appreciated.
Thanks
Ivo
I have two computers running XP. One of them runs Git-1.8.3-preview20130601 without problems, the other doesn't. On the one that doesn't I started the machine in diagnostic startup -virtually no services running and I still have the same problem. I suppose it could be something to do with the registry?

dotcloud supervisord twistd exiting early

I'm trying to set up a twistd daemon on dotcloud:
My supervisord.conf file:
[program:apnsd]
command=/home/dotcloud/env/bin/twistd --logfile /var/log/supervisor/apnsd.log apnsd -c gp_config.py
directory=/home/dotcloud/current/apnsd
However, it looks like the command 'exits early', which then prompts Supervisor to try and restart, which then fails because the twistd dameon is running in the background.
From the supervisord log:
more supervisord.log
2012-05-19 03:07:52,723 CRIT Set uid to user 1000
2012-05-19 03:07:52,723 WARN Included extra file "/etc/supervisor/conf.d/uwsgi.c
onf" during parsing
2012-05-19 03:07:52,723 WARN Included extra file "/home/dotcloud/current/supervi
sord.conf" during parsing
2012-05-19 03:07:52,922 INFO RPC interface 'supervisor' initialized
2012-05-19 03:07:52,922 WARN cElementTree not installed, using slower XML parser
for XML-RPC
2012-05-19 03:07:52,923 CRIT Server 'unix_http_server' running without any HTTP
authentication checking
2012-05-19 03:07:52,932 INFO daemonizing the supervisord process
2012-05-19 03:07:52,934 INFO supervisord started with pid 144
2012-05-19 03:07:53,941 INFO spawned: 'apnsd' with pid 147
2012-05-19 03:07:53,949 INFO spawned: 'uwsgi' with pid 149
2012-05-19 03:07:54,706 INFO exited: apnsd (exit status 0; not expected)
2012-05-19 03:07:55,712 INFO spawned: 'apnsd' with pid 175
2012-05-19 03:07:55,712 INFO success: uwsgi entered RUNNING state, process has s
tayed up for > than 1 seconds (startsecs)
2012-05-19 03:07:56,261 INFO exited: apnsd (exit status 1; not expected)
2012-05-19 03:07:58,267 INFO spawned: 'apnsd' with pid 176
2012-05-19 03:07:58,783 INFO exited: apnsd (exit status 1; not expected)
2012-05-19 03:08:01,790 INFO spawned: 'apnsd' with pid 177
2012-05-19 03:08:02,840 INFO success: apnsd entered RUNNING state, process has s
tayed up for > than 1 seconds (startsecs)
From the apnsd log:
dotcloud#hack-default-www-0:/var/log/supervisor$ more apnsd-stderr---supervisor
-m7GnKV.log
INFO:root:Reactor Type: <twisted.internet.pollreactor.PollReactor object at 0x10
a09d0>
DEBUG:root:Creating listener: apnsd.listeners.line.LineProtocolFactory
INFO:root:Listening on Line Protocol on :1055
DEBUG:root:Listener Created: <apnsd.listeners.line.LineProtocolFactory instance
at 0x12fc8c0>
DEBUG:root:Creating App Factory: apnsd.daemon.APNSFactory
INFO:root:Connecting to APNS Server, App: apns_dev:AAA.com.company.www
INFO:root:apns_dev:AAA.com.company.www -> Started connecting to APNS con
nector...
INFO:root:Registering Application: apns_dev:GoParcel...
DEBUG:root:Creating App Factory: apnsd.daemon.APNSFactory
INFO:root:Connecting to APNS Server, App: apns_dev:T365ED94A9.com.appitems.parce
ls
INFO:root:apns_dev:T365ED94A9.com.appitems.parcels -> Started connecting to APNS
connector...
INFO:root:Registering Application: apns_dev:GoParcelVictor...
Another twistd server is running, PID 172
This could either be a previously started instance of your application or a
different application entirely. To start a new one, either run it in some other
directory, or use the --pidfile and --logfile parameters to avoid clashes.
Another twistd server is running, PID 172
--More--(42%)
Status of worker is failed:
./dotcloud run hack.worker supervisorctl status
USER PATH IS: C:\Users\Taras/.dotcloud\dotcloud.conf
# supervisorctl status
apnsd FATAL Exited too quickly (process log may
have details)
But the twistd process is there (ps -ef):
dotcloud 171 1 0 03:13 ? 00:00:00 /home/dotcloud/env/bin/python /home/dotcloud/env/bin/twistd --logfile /var/log/supervisor/apnsd.log apnsd -c gp_config.py
I am having a similar problem when trying to start the process through a wrapper script (and using exec so that a child process isn't created). What am I doing wrong?
Supervisor expects the controlled process to remain in the foreground, but twistd forks to the background by default. Supervisor therefore thinks that it has exited, and tries to start it again.
You should start twistd with the --nodaemon option: twistd will remain in the foreground, and Supervisor will be happy!

Supervisord does not start killed processes

I have supervisord installed on my Ubuntu 10.04 and it runs a Java process continuously and supposed to heal (reload) process when it somehow dies or crashes.
On my htop I send SIGKILL, SIGTERM, SIGHUP, SIGSEGV signals to that Java process and watch /etc/logs/supervisord.log file and it says.
08:09:46,182 INFO success: myprogram entered RUNNING state,[...]
08:38:10,043 INFO exited: myprogram (exit status 0; expected)
At 08:38 I kill the process with SIGSEGV. How come it is exited with code 0 and why does not supervisord restart it at all?
All my supervisord.conf about this specific program is as follows:
[program:play-9000]
command=play run /var/www/myprogram/ --%%prod
stderr_logfile = /var/log/supervisord/myprogram-stderr.log
stdout_logfile = /var/log/supervisord/myprogram-stdout.log
Process works really fine when I launch supervisord, however does not get healed.
By the way any ideas how to start supervisord as a service so that it automatically launches when the whole system reboots?
Try setting autorestart=true. By default, autorestart is set to "unexpected" which means it will only restart a process if it exits with an unexpected exit code. By default, exit code 0 is expected.
http://supervisord.org/configuration.html#program-x-section-settings
You can use the chkconfig program to make sure that supervisor starts on reboot.
$ sudo apt-get install chkconfig
$ chkconfig -l supervisor
supervisor 0:off 1:off 2:on 3:on 4:on 5:on 6:off
You can see that it's enabled for runlevels 2-5 by default when I installed it.
$ man 7 runlevel
for more info on run levels.