Why does the LLDB Debugger constantly fail to attach? - ios

I have seen a lot of answers for this question:
error: failed to attach to process ID
as switch to GDB. But no one addresses the reason of why it happens?
Attaching works fine with the GDB debugger but the default and recommended project setting is LLDB.
Can anybody explain why LLDB fails? Is it a common bug or am I doing something wrong?
Alternatively, how can I set GDB as my default debugger without changing it manually when creating the new projects?
System Info:
OS: Lion
RAM: 5GB
XCode: Version 4.6 (4H127)
Device: Mac mini
My localhost setting:

Make sure you have localhost mapped to 127.0.0.1 in your /etc/hosts file:
$ grep localhost /etc/hosts
If grep doesn't show 127.0.0.1 then add it:
$ sudo -i
# echo "127.0.0.1 localhost" >> /etc/hosts
^ That '#' is root's command prompt; don't type it otherwise you will comment-out the statement and nothing will happen
NOTE Use >> and not >! (better is to edit it using vi or mate or whatever).
My /etc/hosts file shows (ignoring comments):
127.0.0.1 localhost
255.255.255.255 broadcasthost
::1 localhost
fe80::1%lo0 localhost

Apple likes to move forward. So setting gdb as the debugger for all new projects is not an option.
Sometimes, you have to reset the iOS Simulator to clean up the debugger.

Related

How do I resolve this OSError: [Erno 48] Address already in use error while working with the byob botnet on GitHub?

(I have seen other solutions to "Errno 48" issues on StackOverflow, but none have been successful yet.)
I am trying to develop a botnet using byob on github here: https://github.com/malwaredllc/byob
I am encountering a address in use error every time I run the command sudo ./startup.sh. It returns OSError: [Errno 48] Address already in use.
However when I attempt to use the ps -fA | grep python and kill the associated 502 18126 16973 0 9:16PM ttys000 0:00.00 grep python by using kill -9 181216, I get this error: kill: kill 18126 failed: no such process.
Does anyone have any idea what to do?
I am using a "MacOS M1Pro Chip OS V12.0.1 Monterey". Also the program byob is trying to run on port 5000 of IPv4 127.0.0.1 (this is a generic IP not specifically mine). http://127.0.0.1/5000.
In case you try to duplicate the problem you need to install docker.io or the docker desktop app depending on os then navigate to cd <outer-dir>/byob-master/web-gui then execute sudo ./startup.sh. The code will not work without access to docker, and the program needs to be ran with admin perms using the prefix sudo. The actual downloads take a while and it will prompt you to restart once. Then when you run it again, I encounter this problem...
Please let me know if someone was able to fix this. Thanks!

Deployd dpd "app" - listening on port then goes right to "bye"

I had deployd running just fine on my MAC OS, then I let it sit for a couple weeks.
Went back to it, launching the Deployd server with "dpd app_name"
I get the following:
listening on port 2403
type help for a list of commands
dpd > bye
I've tried to install/reinstall multiple times, it's doing it also on all deployd website examples.
I've tried changing the port, no luck
I've looked for an error log file. Couldn't find any.
I tried to go on Chrome and Safari, same thing: "Connection Refused".
Any idea, anyone?
Thanks in advance!
That happened to me, just type sudo before dpd.
$ sudo dpd
If you run:
$ DEBUG=* dpd
inside the app folder you will probably see the problem is with mongod, and run with sudo solves it.

/dev/ttyUSB1 cannot be changed in SLIP using Contiki OS with MICAz platform

I have a problem when using the SLIP in Contiki. The port only can be changed to /dev/ttyUSB1 in /contiki/tools directory with the command sudo ./tunslip6 -s /dev/ttyUSB1 aaaa::1/64 -v6
However, when I want to make a connection at /contiki/examples/ipv6/rpl-border-router directory, with the command make connect-router, it will then change back to /dev/ttyUSB0
May I know what is the problem?
Thank you.
The command make executes the recipes contained in the file Makefile. If you look within that (in your example folder) you will find the recipe calling tunslip:
connect-router-cooja: $(CONTIKI)/tools/tunslip6
sudo $(CONTIKI)/tools/tunslip6 -a 127.0.0.1 $(PREFIX)
you can change the command there and add -s /dev/ttyUSB1.

Getting Rsync 3.0.9 to work on Vagrant VM box through Cygwin on windows 7

My vagrant VM box is super slow when I try to run my Rails app on it, and I'm guessing it's due to the shared folder problem.
I am trying to use rsync to circumvent the problem.
I installed Cygwin and necessary packages, put C:\cygwin64\bin; as PATH environment variable
and then changed my Vagrantfile to
config.vm.synced_folder ".", "/vagrant", type: "rsync"
When I run vagrant up, I Get this error message
$ vagrant up Bringing machine 'default' up with 'virtualbox'
provider... "rsync" could not be found on your PATH. Make sure that
rsync is properly installed on your system and available on the PATH.
What's going wrong here?
Thank you so much ... if there's any other way to run Vagrant VM box smoothly and faster on Windows 7, I would love to hear it too.
This turned out to be a bunch of brick-walls you have to circumvent when installing Rsync and setting it up correctly for Vagrant on Windows 7.
First of all, the error "rsync" could not be found on your PATH. Make sure that rsync is properly installed on your system and available on the PATH. was due to the fact that
1) Environment variable for Cygwin was placed in the latest order in the PATH, I changed it to the beginning of the path
2) During installation of Cygwin and Rsync, I installed individual "subpackages" instead of installing everything, thinking that it would be okay. Turns out I was wrong. I installed everything in the Admin package and Net package (not the SRC but just the bins), and then it started working. I suggest you set-up Cygwin again and really try to download everything if you see that error.
(I found these solutions through this post on SO cygwin + rsync)
Now, I could go into CMD and type rsync, and it would show up correctly. But then when I ran vagrant up it gave me another error saying
There was an error when attempting to rsync a synced folder. Please inspect the error message below for more info.
Host path: /c/Users/xxxxx Guest path: /vagrant
Command: rsync --verbose --archive --delete -z --copy-links
--chmod=ugo=rwX --no-perms --no-owner --no-group --rsync-path sudo rsync -e ssh -p 2222 -o StrictHostKeyCh
/c/Users/xxxx / vagrant#127.0.0.1:/vagrant
Error: cygwin warning: MS-DOS style path detected:
C:/Users/xxxxxxx Preferred POSIX
equivalent is:
/cygdrive/c/Users/xxxx CYGWIN
environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames Warning: Permanently added '[127.0.0.1]:2222' (ECDSA) to the list of
known hosts. rsync: change_dir "/c/Users/xxxxxxx"
failed: No such file or directory (2) rsync error: some files/attrs
were not transferred (see previous errors) (code 23) at
/usr/src/ports/rsync/rsync-3.0.9-1/src/rsync-3.0.9/main.c(1052)
[sender=3.0.9]
I googled solution to this error and found this site. https://github.com/mitchellh/vagrant/issues/3230
Then there's a bug with Vagrant and cwrsync that I mentioned in #3086.
For now, just edit
C:\HashiCorp\Vagrant\embedded\gems\gems\vagrant-1.5.1\plugins\synced_folders\rsync\helper.rb
and add hostpath = "/cygdrive" + hostpath to line 74. It's a terrible
solution but quick and simple.
Editing that helper.rb file and adding hostpath at line 74 (just made some blank lines right there and pasted it in) and now it works perfectly!!!!
Rsync makes the shared folder soooooo much faster on Rails!!!! I think it is worth the pain of setting it up correctly. Try it!!
It's not clear from your message, but I think you installed rsync on your machine (the host), while it needs to be installed on the virtual machine you bringing up (the guest).

unable to start rabbitmq-server

I installed rabbitmq using homebrew. I am trying to start rabbitmq server but I always get this error which I am unable to figure out why!
I have erlang installed and there is no other application running on the same port.
$ rabbitmq-server
{error_logger,{{2013,2,11},{22,37,49}},"Can't set short node name!\nPlease check your configuration\n",[]}
{error_logger,{{2013,2,11},{22,37,49}},crash_report,[[{initial_call,{net_kernel,init,['Argument__1']}},{pid,},{registered_name,[]},{error_info,{exit,{error,badarg},[{gen_server,init_it,6,[{file,"gen_server.erl"},{line,320}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}},{ancestors,[net_sup,kernel_sup,]},{messages,[]},{links,[]},{dictionary,[{longnames,false}]},{trap_exit,true},{status,running},{heap_size,610},{stack_size,24},{reductions,249}],[]]}
{error_logger,{{2013,2,11},{22,37,49}},supervisor_report,[{supervisor,{local,net_sup}},{errorContext,start_error},{reason,{'EXIT',nodistribution}},{offender,[{pid,undefined},{name,net_kernel},{mfargs,{net_kernel,start_link,[[rabbitmqprelaunch1593,shortnames]]}},{restart_type,permanent},{shutdown,2000},{child_type,worker}]}]}
{error_logger,{{2013,2,11},{22,37,49}},supervisor_report,[{supervisor,{local,kernel_sup}},{errorContext,start_error},{reason,shutdown},{offender,[{pid,undefined},{name,net_sup},{mfargs,{erl_distribution,start_link,[]}},{restart_type,permanent},{shutdown,infinity},{child_type,supervisor}]}]}
{error_logger,{{2013,2,11},{22,37,49}},std_info,[{application,kernel},{exited,{shutdown,{kernel,start,[normal,[]]}}},{type,permanent}]}
{"Kernel pid terminated",application_controller,"{application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}}"}
Crash dump was written to: erl_crash.dump
Kernel pid terminated (application_controller) ({application_start_failure,kernel,{shutdown,{kernel,start,[normal,[]]}}})
btw, erl -sname abc gives the same output
Update:
This is what I have in /etc/hosts
127.0.0.1 localhost
255.255.255.255 broadcasthost
check your computer name and your short host name or alias name in /etc/hosts, match this
Check your computer name [wendy#nyc123]$
nyc123 is your computer name
Check your short hostname
[wendy#nyc123]$ hostname -s
[wendy#nyc123]$ nyc456
This error could happen because your computer name and short host name didn't match. To match this, you can change the computer hostname or alias name.
Change computer host name
[wendy#nyc123]$ hostname nyc456
close your terminal and open again
[wendy#nyc456]$
the computer name has changed
or
Change alias name in /etc/hosts
127.0.0.1 nyc123.com nyc123
save and check again
[wendy#nyc123]$ hostname -s
[wendy#nyc123]$ nyc123
Restart your rabbitmq!
[root#nyc123]$ rabbitmq-server start</p>
RabbitMQ 3.6.0. Copyright (C) 2007-2015 Pivotal Software, Inc.</p>
## ## Licensed under the MPL. See http://www.rabbitmq.com/</p>
## ##</p>
########## Logs: /var/log/rabbitmq/rabbitmq#nyc123.com.log</p>
###### ## /var/log/rabbitmq/rabbitmq#nyc123.com-sasl.log</p>
##########</p>
Starting broker... completed with 6 plugins.</p>
I looked for a similar error on google, and it looks like it can happen if your /etc/hosts file is in the wrong format. Try fixing it and see if that helps.
References:
http://www.ejabberd.im/node/18
Explanation on RabbitMQ Mailing list
Edit: For completeness, it seems like setting a long name (of the form abc#abc) worked.
Found the answer here:
control rabbitmq 'name' not 'sname'
Set your machine name to something simple and make it an alias to locahost
I also encountered this problem yesterday and found the root cause:
I had changed my system's hostname to a "long" name, pm3(hc desktop).
If your server's hostname is long or invalid, Linux can still work and no error message is prompted to you. As you just modify the /etc/hostname file and reboot. However, the rabbitmq server may not work and give this "short-name" error message to you.
I changed hostname back to "pm3", rebooted and everything went well.
I solved this issue changing the computer name (on windows 8.1). The problem was that the name had a strange character (é) spanish letter. My computer name was Andrés and I changed it to Andres, restarted my computer and everything worked well. I think that Rabbit could not recognize that name (Andrés) for that strange character.
remove old style config file /etc/rabbitmq/rabbitmq.config
and use rabbitmq.conf
with listeners.tcp.default = 5672
after that restart rabbitmq server again
In my case that solved the issue in ec2 instance

Resources