Tinderd Bug - Tinderd killing wrong processes

Tom Judge tom at tomjudge.com
Thu Mar 12 15:23:32 EDT 2009


Joe Marcus Clarke wrote:
> On Thu, 2009-03-12 at 12:15 -0500, Tom Judge wrote:
>   
>> Joe Marcus Clarke wrote:
>>     
>>> <snip>
>>>
>>> What TB is trying to do is kill off processes that are holding a mount
>>> point open.  In this case, the mount point
>>> is /data/tinderbox/portstrees/mintel-6-2-mysql-5-0-51/ports.  Any
>>> process which is using that directory is fair game.  I'm guessing you
>>> started your jail from within that directory.
>>>
>>> As soon as the processes are dead, that directory gets unmounted, so
>>> things would probably start to fail anyway.
>>>
>>> Joe
>>>
>>> <snip>
>>>       
>> I think the problem is that tinderd is being over zealous with the 
>> killing of processes.  The sshd/cron/syslogd's are not in that 
>> directory.  That directory is nullfs mounted off of:
>>
>> /data/ports/mintel-6-2-mysql-5-0-51
>> <SNIP>
>>
>> And the ports tree definition:
>>
>> mysql>  select * from ports_trees where 
>> ports_tree_name='mintel-6-2-mysql-5-0-51'\G
>> *************************** 1. row ***************************
>>          ports_tree_id: 1
>>        ports_tree_name: mintel-6-2-mysql-5-0-51
>> ports_tree_description:  FreeBSD 6.2 MySQL 5.0.51
>>  ports_tree_last_built: 2009-02-12 16:59:41
>>  ports_tree_update_cmd: USER
>>  ports_tree_cvsweb_url: http://viewvc.mintel.co.uk/viewvc.cgi/mintelbsd/
>> ports_tree_ports_mount: /data/ports/mintel-6-2-mysql-5-0-51
>>     
>
> I don't think this is what you want.  If you set this column to NULL in
> the database, I think this problem will go away.  Take a look at mine:
>
> mysql> select * from ports_trees where ports_tree_name = 'MarcusCom'\G
> *************************** 1. row ***************************
>          ports_tree_id: 2
>        ports_tree_name: MarcusCom
> ports_tree_description:  MarcusCom ports tree
>  ports_tree_last_built: 2009-03-12 13:14:30
>  ports_tree_update_cmd: USER
>  ports_tree_cvsweb_url: http://www.marcuscom.com:8080/cgi-bin/cvsweb.cgi/ports/
> ports_tree_ports_mount: NULL
> 1 row in set (0.00 sec)
>
> Joe
>
>
>   
Why would I set it to null?  I followed the example in the README for 
using NullFS to mount the ports tree.

" ./tc createPortsTree -p /FreeBSD/ -m //directory"
/
My ports tree is stored in /data/ports/mintel-6-2-mysql-5-0-51 and my 
tinderbox base is /data/tinderbox.

My ports trees are used by more than just tinderbox so I wanted the 
mounted by nullfs. I could change this to nfs on localhost but why add 
the NFS overhead when you can use nullfs?

I still feel that you are trying to tell me that no bug exists when 
tinderd is killing processes on the box that are _nothing_ to do with 
tinderbox and _do_not_ have files open in the ports directory.

Some questions:

1) Why would the master listening SSHD have a file open in /usr/ports 
(jailed chroot path) ?

2) Why would tinderd think that a jailed processes has a file open in 
the mount point /data/tinderbox/portstrees/mintel-6-2-mysql-5-0-51 when 
the jail can't even access that path?

I think the process selection code is broken and does not work correctly 
on nullfs mounted ports trees. 

Tinderd is killing all my jailed processes that have ports trees nullfs 
mounted inside them from the same source as the nullfs origin that 
tinderbox is using.  Does that not seem wrong to you?


Tom

>> 1 row in set (0.00 sec)
>>
>> mysql>
>>
>>
>> What process does tinderd use to work out if the tree is in use?  I 
>> think it may be getting confused by nullfs.  Also I cant see any reason 
>> that the master sshd process from this jail would ever enter the 
>> /usr/ports inside the jail chroot.
>>
>> Surely this is a bug in the process selection code?
>>
>> Also do the does addPort and addBuildPortsQueueEntry mount the ports 
>> file system?
>>
>> Tom
>>
>>
>>
>>     



More information about the tinderbox-list mailing list