Re: Debugging ports

2017-10-18 Thread Piotr Kubaj via freebsd-ports

Well, 11-STABLE now has LLVM 5.0 too, so it should work as well as in head. I 
actually tried it on the recent 11-STABLE.

On 17-10-18 10:03:49, Guido Falsi wrote:

On 10/18/2017 09:59, Piotr Kubaj wrote:

According to https://wiki.freebsd.org/lldb, it should work just fine on
amd64, apart from kernel debugger. I suppose there should be some
improvements for other archs too, since that page was updated 1.5 years
ago :)


Great! And good to know, I'll give it a spin the next time I need to
debug something on head :)

--
Guido Falsi 

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



--
_ 
/ All Gods were immortal. \

| |
\ -- Stanislaw J. Lec, "Unkempt Thoughts" /
- 
   \   ^__^

\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||


signature.asc
Description: PGP signature


Re: Debugging ports

2017-10-18 Thread Piotr Kubaj via freebsd-ports

According to https://wiki.freebsd.org/lldb, it should work just fine on amd64, 
apart from kernel debugger. I suppose there should be some improvements for 
other archs too, since that page was updated 1.5 years ago :)

On 17-10-18 09:54:05, Guido Falsi wrote:

On 10/18/2017 09:52, Piotr Kubaj wrote:

Shouldn't lldb be the replacement for gdb in base?


I'm not keeping an eye on that, but I don't think it's ready at present.

--
Guido Falsi 

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



--
_ 
/ Due to lack of disk space, this fortune \

\ database has been discontinued. /
- 
   \   ^__^

\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||


signature.asc
Description: PGP signature


Re: Debugging ports

2017-10-18 Thread Piotr Kubaj via freebsd-ports

Shouldn't lldb be the replacement for gdb in base?

On 17-10-18 09:47:25, Guido Falsi wrote:

On 10/18/2017 06:33, Jan Beich wrote:

Kubilay Kocak  writes:


On 10/18/17 8:29 AM, Jan Beich wrote:


Guido Falsi  writes:


On 10/17/2017 23:11, Guido Falsi wrote:



Thing is, recompiling with WITH_DEBUG doesn't help (I only get
memory addresses in gdb), nor does -DCMAKE_BUILD_TYPE=Debug to
CMAKE_ARGS (the port uses CMake).


Sorry, I clearly did not parse your message correctly.

Looks strange though, WITH_DEBUG always worked for me... Usually I
compile the whole set in poudriere with WITH_DEBUG, to make sure all
libraries have symbols too.


WITH_DEBUG doesn't disable vendor optimizations like -fomit-frame-pointer
which may hinder stack unwinding, doesn't enable debug symbols for ports
not respecting CFLAGS, often a nop for non-C/C++ ports, etc.


Could the framework WITH_DEBUG block remove this (and potentially) other
relevant flags from C*FLAGS if present with variable modifiers?


Only for what make(1) inherits when Mk/bsd.port.mk is parsed. A lot more
ports pass the option via makefiles under WRKSRC that cannot be altered
short of patching or overriding all CFLAGS.

To get accurate list of offenders an -exp run WITH_DEBUG=1 is required
then grep(1) build logs for -fomit-frame-pointer and -O* flags. This can
result in bugs against ports that fail to properly respect CFLAGS, so the
port maintainers can help with patches.


I'm preparing a patch related to WITH_DEBUG, which, if accepted, will
need an exp-run before going in.

That would be a good chance to perform a check for these kind of things.

But I'm still working on it and will need a little more time. I'll let
you know as soon as I have something I am willing to show.

BTW on head gdb is gone from base for i386/amd64 AFAIK, so ports gdb
will be the only way to go in the future.

--
Guido Falsi 

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



--
 
/ The student in question is performing  \

| minimally for his peer group and is an |
\ emerging underachiever./
 
   \   ^__^

\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||


signature.asc
Description: PGP signature


Re: Debugging ports

2017-10-17 Thread Piotr Kubaj via freebsd-ports

I think I got it. It turns out that it's our gdb in base that can't read the 
debug info. lldb and gdb from ports do it just fine.

I also thought about recompiling library dependecies, but something didn't fit 
in, because not only the libraries calls were not there, but the calls from the 
port itself as well.

Thanks anyway!

On 17-10-17 23:29:47, Jan Beich wrote:

Guido Falsi  writes:


On 10/17/2017 23:11, Guido Falsi wrote:



Thing is, recompiling with WITH_DEBUG doesn't help (I only get
memory addresses in gdb), nor does -DCMAKE_BUILD_TYPE=Debug to
CMAKE_ARGS (the port uses CMake).


Sorry, I clearly did not parse your message correctly.

Looks strange though, WITH_DEBUG always worked for me... Usually I
compile the whole set in poudriere with WITH_DEBUG, to make sure all
libraries have symbols too.


WITH_DEBUG doesn't disable vendor optimizations like -fomit-frame-pointer
which may hinder stack unwinding, doesn't enable debug symbols for ports
not respecting CFLAGS, often a nop for non-C/C++ ports, etc.

Without an example it's hard to guess.

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.



--
_ 
/ If a camel is a horse designed by a \

| committee, then a consensus forecast is |
| a camel's behind.   |
| |
\ -- Edgar R. Fiedler /
- 
   \   ^__^

\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||


signature.asc
Description: PGP signature


Debugging ports

2017-10-17 Thread Piotr Kubaj via freebsd-ports

Hi all,

I am preparing a new port. However, I hit an assertion fail when starting the 
binary. The developer is willing to help me, provided that I send him backtrace 
and values from the structure that hits assertion failure.

Thing is, recompiling with WITH_DEBUG doesn't help (I only get memory addresses 
in gdb), nor does -DCMAKE_BUILD_TYPE=Debug to CMAKE_ARGS (the port uses CMake).

What should I do to get necessary date?

--
__ 
/ The three best things about going to \

\ school are June, July, and August.   /
-- 
   \   ^__^

\  (oo)\___
   (__)\   )\/\
   ||w |
   || ||


signature.asc
Description: PGP signature


Re: FreeBSD Port: MailScanner-5.0.3

2017-07-29 Thread Piotr Kubaj via freebsd-ports
After your commit, I now get an error during staging:
(00:00:54) 
===
(00:00:54) ===
(00:00:54) ===>  Staging for MailScanner-5.0.3_1
(00:00:54) ** Missing /usr/ports/mail/mailscanner/files/pkg-deinstall.in for 
MailScanner-5.0.3_1.
(00:00:54) *** Error code 1


On 17-07-28 21:48:31, Chris Rees wrote:
>I've committed a fix using @sample for the config files, and fixed the
>regexes for paths.  @sample keyword was made for ports like this...
>The port will no longer destroy your configuration.
>Cheers,
>Chris
> 
>--
>This message has been scanned for viruses and
>dangerous content by [1]MailScanner, and is
>believed to be clean.
>--
>This message has been scanned for viruses and
>dangerous content by [2]MailScanner, and is
>believed to be clean.
> 
> References
> 
>1. http://www.mailscanner.info/
>2. http://www.mailscanner.info/

-- 
  
/ Fog Lamps, n.: \
||
| Excessively (often obnoxiously) bright |
| lamps mounted on the   |
||
| fronts of automobiles; used on dry,|
| clear nights to indicate   |
||
| that the driver's brain is in a fog.   |
||
\ See also "Idiot Lights".   /
  
\   ^__^
 \  (oo)\___
(__)\   )\/\
||w |
|| ||


signature.asc
Description: PGP signature


Re: www/lighttpd 1.4.45 broken mod_fastcgi for PHP

2017-03-02 Thread Piotr Kubaj via freebsd-ports
Could you send me a truss(1) output of the relevant process?

On 17-03-01 11:36:02, Miroslav Lachman wrote:
> Piotr Kubaj wrote on 2017/03/01 11:13:
> > If FPM works fine, it looks to me more like PHP error than Lighttpd's. 
> > Could you use truss(1) on Lighttpd's process to obtain more information?
> 
> Can it be related to this fix:
> 
> [mod_fastcgi] detect child exit, restart proactively
> https://www.lighttpd.net/2017/1/14/1.4.45/
> 
> Because it seems like Lighttpd is trying to find / kill child, 
> complaints that there is not this PID anymore but it is still here and 
> PHP is running.
> 
> Miroslav Lachman
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 

-- 
  
/ The founding fathers tried to set up a \
| judicial system where the accused  |
| received a fair trial, not a system to |
\ insure an acquittal on technicalities. /
  
\   ^__^
 \  (oo)\___
(__)\   )\/\
||w |
|| ||


signature.asc
Description: PGP signature


Re: www/lighttpd 1.4.45 broken mod_fastcgi for PHP

2017-03-01 Thread Piotr Kubaj via freebsd-ports
If FPM works fine, it looks to me more like PHP error than Lighttpd's. Could 
you use truss(1) on Lighttpd's process to obtain more information?

On 17-03-01 10:56:29, Miroslav Lachman wrote:
> Piotr Kubaj wrote on 2017/03/01 08:59:
> > Hi,
> >
> > I use Lighttpd 1.4.45_1 on 11.0-RELEASE with mod_fastcgi and php-cgi. There 
> > are no problems with this setup. Are you sure php-cgi processes are running 
> > are the socket file is present?
> 
> Yes, there ara php-cgi processes. The strange thing is PHP web site is 
> runing  - phpinfo() works. But there are too many errors in the log -
> 33548 in about 40 minutes.
> 
> This is production machine so I must solved it fast and converted to 
> php-fpm which works fine.
> 
> If you want some more info, let me know what and I'll try to run this at 
> night again.
> 
> Miroslav Lachman
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 

-- 
  
/ We can embody the truth, but we cannot \
| know it.   |
||
\ -- Yates   /
  
\   ^__^
 \  (oo)\___
(__)\   )\/\
||w |
|| ||


signature.asc
Description: PGP signature


Re: www/lighttpd 1.4.45 broken mod_fastcgi for PHP

2017-03-01 Thread Piotr Kubaj via freebsd-ports
Hi,

I use Lighttpd 1.4.45_1 on 11.0-RELEASE with mod_fastcgi and php-cgi. There are 
no problems with this setup. Are you sure php-cgi processes are running are the 
socket file is present?

On 17-03-01 00:36:46, Miroslav Lachman wrote:
> Hi,
> I upgraded from 1.4.44 to 1.4.45_1 and after service restart I got tons 
> of following error in error.log:
> 
> 2017-03-01 00:32:56: (mod_fastcgi.c.3565) pid  59896 1 not found: No 
> child processes
> 
> I have this in lighttpd.conf and it was working for years
> 
> fastcgi.server = ( ".php" =>
> (( "socket" => "/tmp/php-fastcgi.socket",
>"bin-path" => "/usr/local/bin/php-cgi",
>"bin-environment" => (
>   "PHP_FCGI_CHILDREN" => "4",
>   "PHP_FCGI_MAX_REQUESTS" => "4000" ),
>"bin-copy-environment" => (
>   "PATH", "SHELL", "USER" ),
>"allow-x-send-file" => "enable"
> ))
> )
> 
> I don't know what the error means and how to solve it. I searched the 
> web but found nothing relating to this.
> 
> This is on FreeBSD 10.3 amd64 with freshly build packages in our 
> Poudriere (ports OpenSSL used as default)
> 
> Am I alone with this error?
> 
> Miroslav Lachman
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 

-- 
 _ 
/ Women waste men's lives and think they  \
| have indemnified them by a few gracious |
| words.  |
| |
\ -- Honore de Balzac /
 - 
\   ^__^
 \  (oo)\___
(__)\   )\/\
||w |
|| ||


signature.asc
Description: PGP signature