FreeBSD Port

80 views
Skip to first unread message

Fabian Freyer

unread,
Nov 18, 2014, 12:58:44 PM11/18/14
to profan...@googlegroups.com
List,

I have created a FreeBSD port for profanity 4.5.0 at
https://github.com/fabianfreyer/profanity/tree/feature/freebsd-port/ports/net-im/profanity
.

I would like to ask for feedback and testing of this port before I
attempt to upstream it to the FreeBSD ports tree.
It is also somewhat dependent on the libstrophe port at
https://github.com/fabianfreyer/libstrophe/tree/feature/freebsd-port/ports/net-im/libstrophe
.

Also, unfortunately I'm not sure I can maintain these ports at the
moment. I'd be very grateful if someone could do that.

Fabian Freyer

--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing in e-mail?

stde...@googlemail.com

unread,
Jan 13, 2015, 6:02:57 PM1/13/15
to profan...@googlegroups.com
Thx for your preparation :)
I have fixed some issues in the Port, so that i can build it out of the source.
But somehow there are still errors on freebsd:
fish: Job 1, “profanity ” terminated by signal SIGABRT (Abort)
I want to find the reasons for this problem.

When you will allow, i could maintain the ports :)



Boothj5

unread,
Jan 16, 2015, 7:25:08 PM1/16/15
to profan...@googlegroups.com, stde...@googlemail.com
Did you get any further with the issue?  If it's any help, there's a guide to reporting issues on the website:

http://www.profanity.im/issues.html

stde...@googlemail.com

unread,
Jan 18, 2015, 10:44:04 AM1/18/15
to profan...@googlegroups.com, stde...@googlemail.com
I have only found out, that it everytime SIGKILL when i'm logging into my jabber account.

/connect myja...@jabber.ccc.de

If you like, i could send you a log file for this.

I think maybe it's a problem, that it is compiled with Clang or something strange with libc of FreeBSD.

My next step was it, to debug profanity, and look further where it crashed.

Fabian Freyer

unread,
Jan 20, 2015, 9:21:40 AM1/20/15
to profan...@googlegroups.com
stde...@googlemail.com, boothj5, List,

Am 18.01.2015 um 16:44 schrieb stde...@googlemail.com:
> I have only found out, that it everytime SIGKILL when i'm logging into my jabber account.
Are you sure it is SIGKILL? AFAIK processes don't SIGKILL themselves
that often. In your last mail, you mentioned something about SIGABORT:
> But somehow there are still errors on freebsd:
> fish: Job 1, “profanity ” terminated by signal SIGABRT (Abort)

> If you like, i could send you a log file for this.
that would be great.

> I think maybe it's a problem, that it is compiled with Clang or something strange with libc of FreeBSD.
On my FreeBSD 10.1 it compiles correctly with clang.
Could you please attach the output of

truss -o profanity.truss profanity

this generates profanity.truss. please attach it.

ldd $(which profanity)
objdump -x profanity
pkg info profanity

as usual, please censor out any private information, a cursory grep for
jid's, usernames and passwords usually help here.

> My next step was it, to debug profanity, and look further where it crashed.
As boothj5 pointed out, there is some information about debugging on the
webpage. Please be aware that gdb may not be installed on FreeBSD by
default, and you may want to use lldb instead. The syntax is slightly
different:

$ lldb $(which profanity) -c /path/to/coredump
(lldb) thread backtrace all

Am 14.01.2015 um 00:02 schrieb stde...@googlemail.com:
> I have fixed some issues in the Port, so that i can build it out of the source.
What exactly have you changed, it would be great if you could post a diff.
> When you will allow, i could maintain the ports
There shouldn't be a problem from my side, but I'd love to look over
some of the changes in the beginning :).
Message has been deleted

Denis D

unread,
Jan 21, 2015, 4:54:33 AM1/21/15
to profan...@googlegroups.com
Hello Fabian,

alright, i will upload the Port to github , that you can look over it.
After that, I'm unable to do something today, so that means, that i will prepare
the informations, you have asked me for the next days.

Fabian Freyer

unread,
Jan 27, 2015, 8:30:05 PM1/27/15
to profan...@googlegroups.com, stde...@googlemail.com
List,

I have reproduced stde...@googlemail.com issue with the freebsd port.

The crash occurst after connecting using valid credentials.

The preliminary stack trace is as follows:
#0 0x000000080182ea1a in kill () from /lib/libc.so.7
#1 0x00000008017c51c0 in __stack_chk_fail () from /lib/libc.so.7
#2 0x00000008017c5130 in __stack_chk_fail () from /lib/libc.so.7
#3 0x00000008030a4dbe in RAND_status () from /lib/libcrypto.so.7
#4 0x0000000800000000 in ?? ()
#5 0xef105f70ffd38081 in ?? ()
#6 0x01b9e193624d6201 in ?? ()
#7 0x1e0b4560d7360400 in ?? ()
#8 0xbba6f1f75e250984 in ?? ()
#9 0x0000000000000000 in ?? ()

This is with profanity compiled with debugging symbols.
stack frames #4 to #9 look kinda weird to me.

Single-stepping showed the problem occurs in prof_run.
Don't ask me why debugging information isn't included for profanity.c, all relevant options were passed to the compiler.
On FreeBSD, this is done with WITH_DEBUG="YES" in /etc/make.conf.

The program is not being run.
Continuing.

Breakpoint 1, sock_connect (host=0x7fffffffd990 "redacted.example.com", port=5222)
at src/sock.c:86
[...]
xmpp_connect_client (conn=0x8054b9140, altdomain=0x0, altport=0,
callback=0x411380 <_connection_handler>, userdata=0x8054b29e0) at src/conn.c:425
[...]
_jabber_connect (fulljid=0x8050068e0 "j...@redacted.example.com/profanity",
passwd=0x8050206a0 "redacted", altdomain=0x0, port=0)
at src/xmpp/connection.c:404
[...]
0x0000000000410d42 in _jabber_connect_with_details (
jid=0x805006820 "j...@redacted.example.com",
passwd=0x8050206a0 "redacted", altdomain=0x0, port=0)
at src/xmpp/connection.c:184
184 return _jabber_connect(saved_details.jid, passwd, saved_details.altdomain, saved_details.port);
cmd_connect (args=0x805021710, help=<value optimized out>) at src/command/commands.c:135
[...]
cmd_execute (command=0x8050067c0 "/connect",
inp=0x7fffffffe600 "/connect j...@redacted.example.com")
at src/command/command.c:1619
[...]
process_input (inp=0x7fffffffe600 "/connect j...@redacted.example.com")
at profanity.c:212
212 profanity.c: No such file or directory.
in profanity.c
215 in profanity.c
219 in profanity.c
220 in profanity.c
222 in profanity.c
prof_run (disable_tls=0, log_level=0x45afff "INFO", account_name=0x0) at profanity.c:129
129 in profanity.c
98 in profanity.c
99 in profanity.c
101 in profanity.c
103 in profanity.c
104 in profanity.c
105 in profanity.c
109 in profanity.c
111 in profanity.c
112 in profanity.c
117 in profanity.c
119 in profanity.c
121 in profanity.c
122 in profanity.c
124 in profanity.c
125 in profanity.c
103 in profanity.c
104 in profanity.c
105 in profanity.c
109 in profanity.c
111 in profanity.c
112 in profanity.c
117 in profanity.c
119 in profanity.c
121 in profanity.c
122 in profanity.c
124 in profanity.c
125 in profanity.c
103 in profanity.c
104 in profanity.c
105 in profanity.c
109 in profanity.c
111 in profanity.c
112 in profanity.c
117 in profanity.c
119 in profanity.c
121 in profanity.c

Program received signal SIGABRT, Aborted.
0x000000080182ea1a in kill () from /lib/libc.so.7
Single stepping until exit from function kill,
which has no line number information.

Program terminated with signal SIGABRT, Aborted.
The program no longer exists.

however, this seems to be somehow asynchronous, since the kill also happens when a breakpoint is set at prof_run.

Unfortunately, I am unable to debug this further today, but I'll take a closer look soon.

Fabian Freyer

Boothj5

unread,
Jan 28, 2015, 5:51:04 PM1/28/15
to profan...@googlegroups.com, stde...@googlemail.com
Thanks for your efforts on this issue.  I've not yet installed and tested on FreeBSD, but when I get a chance I'll see if I can help debug the problem.

Fabian Freyer

unread,
Jan 29, 2015, 1:48:04 AM1/29/15
to profan...@googlegroups.com
Boothj5, List,

On 28/01/15 23:51, Boothj5 wrote:
> Thanks for your efforts on this issue. I've not yet installed and tested on FreeBSD, but when I get a chance I'll see if I can help debug the problem.

I have attached a vagrantfile to build and install profanity from my ports on freebsd-10.0. It should work on unix-like systems with virtualbox or vmware_desktop installed. Put it in a empty folder and run

vagrant up
(if sudo is installed, you will be prompted for a password to export an nfs share. if you don't want this, just disable the shared folder in the vagrantfile)
vagrant ssh -c profanity

This will generate a core dump in ~vagrant in the virtual machine. GDB is installed and debug options are set.

Fabian
vagrantfile

Fabian Freyer

unread,
Jan 29, 2015, 1:52:15 AM1/29/15
to profan...@googlegroups.com
sorry for the spam, there is an error in the vagrantfile, the correct version is attached:
diff --git a/vagrantfile b/vagrantfile
index 751b9c4..c3a5c57 100644
--- a/vagrantfile
+++ b/vagrantfile
@@ -42,7 +42,7 @@ echo "linking ports"
sudo ln -sf ~vagrant/profanity/ports/net-im/profanity /usr/ports/net-im/
sudo ln -sf ~vagrant/libstrophe/ports/net-im/libstrophe /usr/ports/net-im/
echo "building profanity port..., output: build.log"
-#sudo env BATCH=YES make -C /usr/ports/net-im/profanity clean reinstall >> /vagrant/build.log
+sudo env BATCH=YES make -C /usr/ports/net-im/profanity clean reinstall >> /vagrant/build.log
echo "setting locale"
(cd /etc && sudo patch -Ntp1 login.conf > /dev/null; true) << EOF
--- /etc/login.conf 2015-01-29 06:09:43.325583828 +0000

vagrantfile

Denis D

unread,
Mar 8, 2015, 10:32:01 AM3/8/15
to profan...@googlegroups.com
It seems, that profanity is working on FreeBSD since some time.

https://github.com/boothj5/profanity/issues/428


Thanks a lot Fabian and Arved for the work :)
Reply all
Reply to author
Forward
0 new messages