Comment 0 for bug 361508

Revision history for this message
nguyenthanhvuh (thanhvu) wrote :

ulimit -t doesn't work as expected in kernel 2.6.28.

I think it might be some bug imcompatability w/ kernel 2.6.28 --- I want to file a bug to kernel dev group but just want to check here first. Whenever I use kernel 2.6.28 (e.g., compile my own), the problem occurs. To make sure that it isn't due to my own kernel compilation and setting, I tried on the latest Ubuntu version (Jaunty, beta) w/ 2.6.28 default, problem occurs again (I didn't touch the kernel of Jaunty at all, it's the stock default one). Everything seems fine w/ kernel 2.6.27 (e.g., Intrepid or Hardy) or lower. Also note that dash / bash doesn't seem to be the problem (i.e., ulimit should work w/ both dash and bash).

Below is an example to reproduce the bug.

file: ulimit_test.sh

#!/bin/bash
ulimit -t 1
perl -e 'while(true){}'
exit 0

sh ulimit_test.sh : expected: process is killed after 1 sec,
but w/ 2.6.28: it doesn't get killed at all -- loop forever.