[issue36432] Running python test suite fails on macOS 10.14.4 with resource.RLIMIT_STACK error

2019-07-02 Thread Ned Deily


Ned Deily  added the comment:

See updated Issue34602 discussion for why reverting 
335ab5b66f432ae3713840ed2403a11c368f5406 causes other problems and for a 
different fix for this issue.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36432] Running python test suite fails on macOS 10.14.4 with resource.RLIMIT_STACK error

2019-04-29 Thread Ned Deily


Ned Deily  added the comment:

Thanks, Inada-san, for the pointer.  Closing this as a duplicate of Issue34602

--
resolution:  -> duplicate
stage: test needed -> resolved
status: open -> closed
superseder:  -> python3 resource.setrlimit strange behaviour under macOS

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36432] Running python test suite fails on macOS 10.14.4 with resource.RLIMIT_STACK error

2019-04-16 Thread Berker Peksag


Berker Peksag  added the comment:

I can also confirm that reverting 335ab5b66f432ae3713840ed2403a11c368f5406 
fixes the problem.

--
nosy: +berker.peksag
type:  -> behavior

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36432] Running python test suite fails on macOS 10.14.4 with resource.RLIMIT_STACK error

2019-04-11 Thread Dmitrii Pasechnik


Change by Dmitrii Pasechnik :


--
nosy: +dimpase

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36432] Running python test suite fails on macOS 10.14.4 with resource.RLIMIT_STACK error

2019-04-01 Thread Rémi Lapeyre

Rémi Lapeyre  added the comment:

I confirm that reverting 335ab5b66f432ae3713840ed2403a11c368f5406 work as a 
workaround, and does not seem to create regressions.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36432] Running python test suite fails on macOS 10.14.4 with resource.RLIMIT_STACK error

2019-04-01 Thread Rémi Lapeyre

Change by Rémi Lapeyre :


--
nosy: +remi.lapeyre

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36432] Running python test suite fails on macOS 10.14.4 with resource.RLIMIT_STACK error

2019-03-30 Thread Chih-Hsuan Yen


Change by Chih-Hsuan Yen :


--
nosy: +yan12125

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36432] Running python test suite fails on macOS 10.14.4 with resource.RLIMIT_STACK error

2019-03-26 Thread Inada Naoki


Inada Naoki  added the comment:

I think this issue is duplicate of https://bugs.python.org/issue34602

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36432] Running python test suite fails on macOS 10.14.4 with resource.RLIMIT_STACK error

2019-03-26 Thread Inada Naoki


Inada Naoki  added the comment:

I created simple program calling setrlimit and it succeeds.
I confirmed setrlimit argument is exactly same.
It's very curious why same Python code fails...


== c code
#include 
#include 

int
main(int argc, char *argv[])
{
struct rlimit rl;
int err;

err = getrlimit(RLIMIT_STACK, &rl);
if (err < 0) {
perror("getrlimit");
return err;
}

printf("%d, soft=%llu, hard=%llu\n", RLIMIT_STACK, rl.rlim_cur, 
rl.rlim_max);

err = setrlimit(RLIMIT_STACK, &rl);
if (err < 0) {
perror("setrlimit");
return err;
}

return 0;
}

== Python code
import resource
soft, hard = resource.getrlimit(resource.RLIMIT_STACK)
print("limits=", soft, hard)
resource.setrlimit(resource.RLIMIT_STACK, (soft, hard))

== fails
Traceback (most recent call last):
  File "x.py", line 4, in 
resource.setrlimit(resource.RLIMIT_STACK, (soft, hard))
ValueError: current limit exceeds maximum limit

--
nosy:  -kakshay

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36432] Running python test suite fails on macOS 10.14.4 with resource.RLIMIT_STACK error

2019-03-26 Thread Kumar Akshay

Kumar Akshay  added the comment:

I'm on macOS 10.14.3 and running those commands gives me this ->

~ ulimit -Sa
-t: cpu time (seconds)  unlimited
-f: file size (blocks)  unlimited
-d: data seg size (kbytes)  unlimited
-s: stack size (kbytes) 8192
-c: core file size (blocks) 0
-v: address space (kbytes)  unlimited
-l: locked-in-memory size (kbytes)  unlimited
-u: processes   709
-n: file descriptors4864
➜  ~ ulimit -Ha
-t: cpu time (seconds)  unlimited
-f: file size (blocks)  unlimited
-d: data seg size (kbytes)  unlimited
-s: stack size (kbytes) 65532
-c: core file size (blocks) unlimited
-v: address space (kbytes)  unlimited
-l: locked-in-memory size (kbytes)  unlimited
-u: processes   1064
-n: file descriptorsunlimited

--
nosy: +kakshay

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36432] Running python test suite fails on macOS 10.14.4 with resource.RLIMIT_STACK error

2019-03-26 Thread Inada Naoki


Inada Naoki  added the comment:

My mac is also 10.14.4.  I don't have older macOS now.  Could someone test this?

$ ulimit -Sa
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) unlimited
file size   (blocks, -f) unlimited
max locked memory   (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files  (-n) 4864
pipe size(512 bytes, -p) 1
stack size  (kbytes, -s) 8192
cpu time   (seconds, -t) unlimited
max user processes  (-u) 1418
virtual memory  (kbytes, -v) unlimited

$ ulimit -Ha
core file size  (blocks, -c) unlimited
data seg size   (kbytes, -d) unlimited
file size   (blocks, -f) unlimited
max locked memory   (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files  (-n) unlimited
pipe size(512 bytes, -p) 1
stack size  (kbytes, -s) 65532
cpu time   (seconds, -t) unlimited
max user processes  (-u) 2128
virtual memory  (kbytes, -v) unlimited

--
nosy: +inada.naoki

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue36432] Running python test suite fails on macOS 10.14.4 with resource.RLIMIT_STACK error

2019-03-26 Thread Ned Deily


New submission from Ned Deily :

After upgrading my first macOS system to the newly released macOS 10.14.4 
update, attempts to run the Python test suite via regrtest fail:

$ /usr/local/bin/python3.7 -m test -uall -j3 -w
Traceback (most recent call last):
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", 
line 193, in _run_module_as_main
"__main__", mod_spec)
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/runpy.py", 
line 85, in _run_code
exec(code, run_globals)
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/test/__main__.py",
 line 2, in 
main()
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/test/libregrtest/main.py",
 line 640, in main
Regrtest().main(tests=tests, **kwargs)
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/test/libregrtest/main.py",
 line 586, in main
self._main(tests, kwargs)
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/test/libregrtest/main.py",
 line 607, in _main
setup_tests(self.ns)
  File 
"/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/test/libregrtest/setup.py",
 line 77, in setup_tests
resource.setrlimit(resource.RLIMIT_STACK, (newsoft, hard))
ValueError: current limit exceeds maximum limit

The error is during regrtest initialization when it is trying to increase the 
process stack size to avoid previously seen problems when running tests.  This 
code has been unchanged for a long time.

Stepping through the code in the REPL on 10.14.4:
>>> import resource
>>> resource.getrlimit(resource.RLIMIT_STACK)
(8388608, 67104768)
>>> soft, hard = resource.getrlimit(resource.RLIMIT_STACK)
>>> newsoft = min(hard, max(soft, 1024*2048))
>>> newsoft
8388608
>>> resource.setrlimit(resource.RLIMIT_STACK, (newsoft, hard))
Traceback (most recent call last):
  File "", line 1, in 
ValueError: current limit exceeds maximum limit

The same code run on a macOS system still running 10.14.3 gives the same values 
from getrlimit but does not fail when calling setrlimit.

I will investigate further tomorrow; if this is a general problem with macOS 
10.14.4, we'll need to provide a workaround and possibly open an incident 
report with Apple.

--
assignee: ned.deily
components: macOS
messages: 338858
nosy: ned.deily, ronaldoussoren
priority: critical
severity: normal
stage: test needed
status: open
title: Running python test suite fails on macOS 10.14.4 with 
resource.RLIMIT_STACK error
versions: Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com