Packages with custom /etc/sysctl.d/30-foo.conf files can fail to install: start procps returns exit status 1

Bug #447197 reported by Mariano
458
This bug affects 112 people
Affects Status Importance Assigned to Milestone
procps (Ubuntu)
Invalid
Medium
Unassigned
wine (Ubuntu)
Fix Released
Undecided
Scott Ritchie
wine1.2 (Ubuntu)
Fix Released
Undecided
shitshow

Bug Description

Binary package hint: wine

Description: Ubuntu karmic (development branch)
Release: 9.10

gmariano@ubuntu:~$ apt-cache policy wine
wine:
  Installed: 1.0.1-0ubuntu6
  Candidate: 1.0.1-0ubuntu6
  Version table:
 *** 1.0.1-0ubuntu6 0
        500 http://ar.archive.ubuntu.com karmic/universe Packages
        100 /var/lib/dpkg/status

gmariano@ubuntu:~$ sudo apt-get install wine
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
  binfmt-support libaudio2 ttf-liberation winbind wine-gecko
Suggested packages:
  nas msttcorefonts
The following NEW packages will be installed:
  binfmt-support libaudio2 ttf-liberation winbind wine wine-gecko
0 upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 19.1MB of archives.
After this operation, 76.9MB of additional disk space will be used.
Do you want to continue [Y/n]?
Get:1 http://ar.archive.ubuntu.com karmic/main binfmt-support 1.2.14 [22.3kB]
Get:2 http://ar.archive.ubuntu.com karmic/main libaudio2 1.9.2-1 [84.6kB]
Get:3 http://ar.archive.ubuntu.com karmic/universe wine 1.0.1-0ubuntu6 [7,506kB]
Get:4 http://ar.archive.ubuntu.com karmic/multiverse wine-gecko 0.1.0-0ubuntu1 [5,744kB]
Get:5 http://ar.archive.ubuntu.com karmic/main ttf-liberation 1.05.1.20090721-0ubuntu1 [1,038kB]
Get:6 http://ar.archive.ubuntu.com karmic/main winbind 2:3.4.0-3ubuntu5 [4,694kB]
Fetched 19.1MB in 6min 19s (50.2kB/s)
Selecting previously deselected package binfmt-support.
(Reading database ... 160971 files and directories currently installed.)
Unpacking binfmt-support (from .../binfmt-support_1.2.14_all.deb) ...
Selecting previously deselected package libaudio2.
Unpacking libaudio2 (from .../libaudio2_1.9.2-1_i386.deb) ...
Selecting previously deselected package wine.
Unpacking wine (from .../wine_1.0.1-0ubuntu6_i386.deb) ...
Selecting previously deselected package wine-gecko.
Unpacking wine-gecko (from .../wine-gecko_0.1.0-0ubuntu1_all.deb) ...
Selecting previously deselected package ttf-liberation.
Unpacking ttf-liberation (from .../ttf-liberation_1.05.1.20090721-0ubuntu1_all.deb) ...
Selecting previously deselected package winbind.
Unpacking winbind (from .../winbind_2%3a3.4.0-3ubuntu5_i386.deb) ...
Processing triggers for man-db ...
Processing triggers for sreadahead ...
sreadahead will be reprofiled on next reboot
Processing triggers for desktop-file-utils ...
Setting up binfmt-support (1.2.14) ...
update-binfmts: warning: current package is sun-java6, but binary format
already installed by openjdk-6
 * Enabling additional executable binary formats binfmt-support [ OK ]

Setting up libaudio2 (1.9.2-1) ...

Setting up wine (1.0.1-0ubuntu6) ...
start: Job failed to start
invoke-rc.d: initscript procps, action "start" failed.
dpkg: error processing wine (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up wine-gecko (0.1.0-0ubuntu1) ...
Setting up ttf-liberation (1.05.1.20090721-0ubuntu1) ...
Updating fontconfig cache for /usr/share/fonts/truetype/ttf-liberation
No CIDSupplement specified for Batang-Bold, defaulting to 0.
No CIDSupplement specified for Dotum-Bold, defaulting to 0.
No CIDSupplement specified for ZenHei, defaulting to 0.
No CIDSupplement specified for Batang-Regular, defaulting to 0.
No CIDSupplement specified for ZenHei-CNS, defaulting to 0.
No CIDSupplement specified for Dotum-Regular, defaulting to 0.

Setting up winbind (2:3.4.0-3ubuntu5) ...
 * Starting the Winbind daemon winbind [ OK ]

Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 wine
E: Sub-process /usr/bin/dpkg returned an error code (1)

ProblemType: Package
Architecture: i386
Date: Fri Oct 9 09:56:55 2009
DistroRelease: Ubuntu 9.10
ErrorMessage: subprocess installed post-installation script returned error exit status 1
NonfreeKernelModules: symap_custom_2.6.31_11_generic_i686 symev_custom_2.6.31_11_generic_i686
Package: wine 1.0.1-0ubuntu6
ProcVersionSignature: Ubuntu 2.6.31-12.41-generic
SourcePackage: wine
Title: package wine 1.0.1-0ubuntu6 failed to install/upgrade: subprocess installed post-installation script returned error exit status 1
Uname: Linux 2.6.31-12-generic i686

Revision history for this message
Mariano (alfatester) wrote :
Revision history for this message
subchee (subchee) wrote :

This bug also affects me with the most current Karmic.

subchee@koala:~# uname -a
Linux koala 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:04:26 UTC 2009 i686 GNU/Linux

Revision history for this message
Scott Ritchie (scottritchie) wrote :

I believe I have a fix for this, I'll try to work it into karmic

Changed in wine (Ubuntu):
assignee: nobody → Scott Ritchie (scottritchie)
status: New → In Progress
Changed in wine1.2 (Ubuntu):
assignee: nobody → Scott Ritchie (scottritchie)
status: New → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wine1.2 - 1.1.31-0ubuntu2

---------------
wine1.2 (1.1.31-0ubuntu2) karmic; urgency=low

  * Use Quilt patch system
  * Apply small installer workaround patch that may help Photoshop installs
  * debian/control:
    - ttf-tahoma-replacement and ttf-symbol-replacement are Recommends
  * Symbol should no longer install an empty tahoma dir (LP: #397254)
  * debian/wine1.2.postinst: replace invoke-rc.d with service (LP: #447197)

 -- Scott Ritchie <email address hidden> Sun, 11 Oct 2009 21:29:59 -0700

Changed in wine1.2 (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wine - 1.0.1-0ubuntu7

---------------
wine (1.0.1-0ubuntu7) karmic; urgency=low

  * debian/control: use ttf-corefonts-installer instead of msttcorefonts
  * Rebuild on latest ia32-libs
  * debian/wine.postinst: use service instead of invoke-rc.d (LP: #447197)

 -- Scott Ritchie <email address hidden> Mon, 19 Oct 2009 23:57:59 -0700

Changed in wine (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Paweł T. Jochym (jochym) wrote :

On recent upgrade the message is very similar except the command is not invoke-rc.d but service. But the effect is the same anyway. If I comment out "service procps start" in wine.postinst all installs fine.

Revision history for this message
Scott Ritchie (scottritchie) wrote :

The error occurs when the procps service is already running. procps doesn't seem to appreciate the standard "restart" command however.

/etc/sysctl.d/README says to run /etc/initctl.d procps restart after modifying the files in /etc/sysctl.d (like Wine does), however this fails when procps is already running, resulting in the error above.

As a workaround I'm going to have the Wine package invoke its specific configuration file directly, using sysctl -p /etc/sysctl.d/30-wine.conf

Changed in procps (Ubuntu):
importance: Undecided → Medium
status: New → Confirmed
Changed in wine1.2 (Ubuntu):
status: Fix Released → In Progress
Changed in wine (Ubuntu):
status: Fix Released → In Progress
Revision history for this message
Scott Ritchie (scottritchie) wrote :

On second thought simply duplicating the logic of procps start is a better idea as a workaround, namely:
cat /etc/sysctl.d/*.conf /etc/sysctl.conf | sysctl -p -

When procps is fixed (either to support restart or start), there are a few other things that need to be updated as well:
/etc/sysctl.d/README needs to point to the new method (probably just start procps) rather than suggesting invoke-rc.d
DEBHELPER needs to do the same thing
The Wine package needs to be converted back into using the new method rather than its workaround

summary: - package wine 1.0.1-0ubuntu6 failed to install/upgrade: subprocess
- installed post-installation script returned error exit status 1
+ Packages with custom /etc/sysctl.d/30-foo.conf files can fail to
+ install: start procps returns exit status 1
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wine - 1.0.1-0ubuntu8

---------------
wine (1.0.1-0ubuntu8) karmic; urgency=low

  * debian/wine.postinst: invoke sysctl directly (LP: #447197)

 -- Scott Ritchie <email address hidden> Mon, 26 Oct 2009 01:01:00 -0700

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wine1.2 - 1.1.31-0ubuntu3

---------------
wine1.2 (1.1.31-0ubuntu3) karmic; urgency=low

  * debian/wine1.2.postinst: invoke sysctl directly (LP: #447197)

 -- Scott Ritchie <email address hidden> Sun, 25 Oct 2009 22:48:06 -0700

Changed in wine (Ubuntu):
status: In Progress → Fix Released
Changed in wine1.2 (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Mephisto (ferrylandzaat) wrote :

This bug was not fixed. Wine still gives an error (both 1.0.x and 1.1.x versions).
The real bug is not with procps or the wine package, but with sysctl. The error message occurs when there's keys in the sysctl config files that dont exist.
I'm not sure if my sysctl.conf is a modified version, old version or stock version, but for reference, it contained the following keys that systcl didnt like:
kernel.maps_protect = 1
sys.kernel.maps_protect = 1
net.ipv4.ip_always_defrag = 1
I commented these out and a "service procps start" now does not give an error anymore, and wine installs without any error.

The only proper fix for this is to interpret sysctl exit statuses better in /etc/init/procps. I don't know what exactly the status code is, or supposed to be, but it's probably different for real errors than for unknown keys.

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

"start procps" is the right command

Changed in procps (Ubuntu):
status: Confirmed → Invalid
Revision history for this message
Scott Ritchie (scottritchie) wrote :

In Debian there's a similar issue: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=552313

However the maintainer there says that his procps init script is different and doesn't propegate sysctl's errors. Is that an option?

Changed in wine1.2 (Ubuntu):
status: Fix Released → Triaged
Changed in wine (Ubuntu):
status: Fix Released → Triaged
Revision history for this message
Vincent Gerris (vgerris) wrote :

What is Triaged?
I do not understand if I am having this bug, I get this after every package manger action:
E: wine1.2: subprocess installed post-installation script returned error exit status 255
And:
E: wine1.2-dev: dependency problems - leaving unconfigured
E: wine1.2-dbg: dependency problems - leaving unconfigured

Maybe not the right place, but hope it helps.

Revision history for this message
Vincent Gerris (vgerris) wrote :

Add to the previous: still have the error where this bug seems to be about:
Errors were encountered while processing:
 wine1.2
E: Sub-process /usr/bin/dpkg returned an error code (1)

Can anyone post a workaround until this is fixed?

Revision history for this message
subchee (subchee) wrote : Re: [Bug 447197] Re: Packages with custom /etc/sysctl.d/30-foo.conf files can fail to install: start procps returns exit status 1

If you have Symantec Antivirus installed on your Linux, try to remove
it and try to install WINE again.

2009/11/3 Vincent Gerris <email address hidden>:
> Add to the previous: still have the error where this bug seems to be about:
> Errors were encountered while processing:
>  wine1.2
> E: Sub-process /usr/bin/dpkg returned an error code (1)
>
> Can anyone post a workaround until this is fixed?
>
> --
> Packages with custom /etc/sysctl.d/30-foo.conf files can fail to install: start procps returns exit status 1
> https://bugs.launchpad.net/bugs/447197
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Julio Sanchez Cubas (jscubas) wrote :

No SAV installed in my system, neither previously in Jaunty nor now in Karmic. It seems anyway that this issue happens only on Jaunty upgrade not in a fresh installation.

Revision history for this message
Scott Ritchie (scottritchie) wrote :

The problem is due to a bad key in /etc/sysctl.d/

If you're affected, please attach the output of:
ls -l /etc/sysctl.d
cat /etc/sysctl.d/*

Revision history for this message
Gareth Jones (garethj) wrote :

I think I am affected by this bug. Below is my sysctl.d output as requested and also the full error message from an apt-get upgrade:

$ ls -l /etc/sysctl.d
total 16
-rw-r--r-- 1 root root 77 2009-09-15 22:46 10-console-messages.conf
-rw-r--r-- 1 root root 509 2009-09-15 22:46 10-network-security.conf
-rw-r--r-- 1 root root 107 2009-03-30 13:11 30-wine.conf
-rw-r--r-- 1 root root 450 2009-09-15 22:46 README

$ cat /etc/sysctl.d/*

# the following stops low-level messages on console
kernel.printk = 4 4 1 7

# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks.
net.ipv4.conf.default.rp_filter=1
net.ipv4.conf.all.rp_filter=1

# Turn on SYN-flood protections. Starting with 2.6.26, there is no loss
# of TCP functionality/features under normal conditions. When flood
# protections kick in under high unanswered-SYN load, the system
# should remain more stable, with a trade off of some loss of TCP
# functionality/features (e.g. TCP Window scaling).
net.ipv4.tcp_syncookies=1
# Wine needs to access the bottom 64k of memory in order to launch
# 16 bit programs.
vm.mmap_min_addr = 0
This directory contains settings similar to those found in /etc/sysctl.conf.
In general, files in the 10-*.conf range come from the procps package and
serve as system defaults. Other packages install their files in the
30-*.conf range, to override system defaults. End-users can use 60-*.conf
and above, or use /etc/sysctl.conf directly, which overrides anything in
this directory.

After making any changes, please run "invoke-rc.d procps start".

$ sudo apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]?
Setting up wine1.2 (1.1.31-0ubuntu3) ...
kernel.printk = 4 4 1 7
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.tcp_syncookies = 1
vm.mmap_min_addr = 0
kernel.printk = 4 4 1 7
error: "kernel.maps_protect" is an unknown key
fs.inotify.max_user_watches = 524288
vm.mmap_min_addr = 65536
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.ip_forward = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
net.ipv4.icmp_ignore_bogus_error_responses = 1
net.ipv4.conf.all.accept_redirects = 0
net.ipv6.conf.all.accept_redirects = 0
net.ipv4.conf.all.send_redirects = 0
net.ipv4.conf.all.accept_source_route = 0
net.ipv6.conf.all.accept_source_route = 0
net.ipv4.conf.all.log_martians = 1
error: "sys.kernel.maps_protect" is an unknown key
error: "net.ipv4.ip_always_defrag" is an unknown key
kernel.shmmax = 68157440
kernel.shmall = 68157440
kernel.sysrq = 0
net.ipv4.conf.default.send_redirects = 0
dpkg: error processing wine1.2 (--configure):
 subprocess installed post-installation script returned error exit status 255
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 wine1.2
E: Sub-process /usr/bin/dpkg returned an error code (1)

Revision history for this message
Julio Sanchez Cubas (jscubas) wrote :

Here they are,

$ ls -l /etc/sysctl.d
total 16
-rw-r--r-- 1 root root 77 2009-03-18 23:17 10-console-messages.conf
-rw-r--r-- 1 root root 509 2009-03-18 23:17 10-network-security.conf
-rw-r--r-- 1 root root 107 2009-10-26 10:49 30-wine.conf
-rw-r--r-- 1 root root 450 2009-03-18 23:17 README

$ cat /etc/sysctl.d/*
# the following stops low-level messages on console
kernel.printk = 4 4 1 7

# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks.
net.ipv4.conf.default.rp_filter=1
net.ipv4.conf.all.rp_filter=1

# Turn on SYN-flood protections. Starting with 2.6.26, there is no loss
# of TCP functionality/features under normal conditions. When flood
# protections kick in under high unanswered-SYN load, the system
# should remain more stable, with a trade off of some loss of TCP
# functionality/features (e.g. TCP Window scaling).
net.ipv4.tcp_syncookies=1
# Wine needs to access the bottom 64k of memory in order to launch
# 16 bit programs.
vm.mmap_min_addr = 0
This directory contains settings similar to those found in /etc/sysctl.conf.
In general, files in the 10-*.conf range come from the procps package and
serve as system defaults. Other packages install their files in the
30-*.conf range, to override system defaults. End-users can use 60-*.conf
and above, or use /etc/sysctl.conf directly, which overrides anything in
this directory.

After making any changes, please run "invoke-rc.d procps start".

Revision history for this message
Scott Ritchie (scottritchie) wrote :

Hmm, that means the bad key must be in /etc/sysctl.conf -- could you post that as well?

Revision history for this message
Julio Sanchez Cubas (jscubas) wrote :

Here goes.

$ cat /etc/sysctl.conf
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com

# the following stops low-level messages on console
kernel.printk = 4 4 1 7

# enable /proc/$pid/maps privacy so that memory relocations are not
# visible to other users. (Added in kernel 2.6.22.)
kernel.maps_protect = 1

# Increase inotify availability
fs.inotify.max_user_watches = 524288

# protect bottom 64k of memory from mmap to prevent NULL-dereference
# attacks against potential future kernel security vulnerabilities.
# (Added in kernel 2.6.23.)
vm.mmap_min_addr = 65536

##############################################################3
# Functions previously found in netbase
#

# Comment the next two lines to disable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
net.ipv4.conf.default.rp_filter=1
net.ipv4.conf.all.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies
# This disables TCP Window Scaling (http://lkml.org/lkml/2008/2/5/167),
# and is not recommended.
#net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1
# Disables packet forwarding
net.ipv4.ip_forward = 0

# Uncomment the next line to enable packet forwarding for IPv6
#net.ipv6.conf.all.forwarding=1

###################################################################
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Ignore ICMP broadcasts
net.ipv4.icmp_echo_ignore_broadcasts = 1
#
# Ignore bogus ICMP errors
net.ipv4.icmp_ignore_bogus_error_responses = 1
#
# Do not accept ICMP redirects (prevent MITM attacks)
net.ipv4.conf.all.accept_redirects = 0
net.ipv6.conf.all.accept_redirects = 0
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net.ipv4.conf.all.secure_redirects = 1
#
# Do not send ICMP redirects (we are not a router)
net.ipv4.conf.all.send_redirects = 0
#
# Do not accept IP source route packets (we are not a router)
net.ipv4.conf.all.accept_source_route = 0
net.ipv6.conf.all.accept_source_route = 0
#
# Log Martian Packets
net.ipv4.conf.all.log_martians = 1
#
# The contents of /proc/<pid>/maps and smaps files are only visible to
# readers that are allowed to ptrace() the process
sys.kernel.maps_protect = 1
# Always defragment packets
net.ipv4.ip_always_defrag = 1
kernel.shmmax = 68157440
kernel.shmall = 68157440

# Disables the magic-sysrq key
kernel.sysrq = 0
# Turn off redirects
net.ipv4.conf.default.send_redirects = 0

Revision history for this message
puch (chipollone) wrote :

i have same problem, and i have a upgrade my ubuntu from 9.04, also i have changed /etc/sysctl.conf
in ubuntu 9.04

i have resolved this problem after i change this file to

<code>
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com
#net/ipv4/icmp_echo_ignore_broadcasts=1

# Uncomment the following to stop low-level messages on console
#kernel.printk = 4 4 1 7

##############################################################3
# Functions previously found in netbase
#

# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies
#net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1

# Uncomment the next line to enable packet forwarding for IPv6
#net.ipv6.ip_forward=1

###################################################################
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Ignore ICMP broadcasts
#net/ipv4/icmp_echo_ignore_broadcasts = 1
#
# Ignore bogus ICMP errors
#net/ipv4/icmp_ignore_bogus_error_responses = 1
#
# Do not accept ICMP redirects (prevent MITM attacks)
#net/ipv4/conf/all/accept_redirects = 0
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net/ipv4/conf/all/secure_redirects = 1
#
# Do not send ICMP redirects (we are not a router)
#net/ipv4/conf/all/send_redirects = 0
#
# Do not accept IP source route packets (we are not a router)
#net/ipv4/conf/all/accept_source_route = 0
#
# Enable TCP Syn Cookies
#net/ipv4/tcp_syncookies = 1
#
# Log Martian Packets
#net/ipv4/conf/all/log_martians = 1
#
# Always defragment packets
#net/ipv4/ip_always_defrag = 1
</code>

i took this from http://ubuntuforums.org/showthread.php?t=597831

Revision history for this message
Christian Wilken (drwilken) wrote :

Correct me if I'm wrong but AFAIK You only need to comment (#) the lines which apt-get complains about...

There's no need to disable everything (AFAIK)... :)

Revision history for this message
Ed Guenter (edgue) wrote :

I tried to comment just the lines I saw flagged as error somewhere.
Didnt work.

So I commented the whole file; removed wine and added it again ... voila,
install works.

==> this seems to be a working workaround, but obviously there is still the
need for a fix.

Revision history for this message
dk75 (amidk75) wrote :

OK.
As I see, every one have "vm.nmap_min_adr = 0" key in it's "/etc/sysctl.conf" and almost every one did upgrade from Jaunty.
As I have clean install of Karmic on my box then I havent had this key in my "/etc/sysctl.conf" but I've added it in my atempt to run ARMEL crosscompilation on Scratchbox2.

In speciffic I've added these keys:
vm.nmap_min_adr = 4096
vm.vdso=0

After commenting it out I was succesful in installing wine1.2

Revision history for this message
Scott Ritchie (scottritchie) wrote :

The problem comes from invalid keys. Writing "vm.nmap_min_adr" is an invalid key as it should be "vm.mmap_min_addr"

Revision history for this message
dk75 (amidk75) wrote :

Sorry, it was typo on my side when I've wroted message on launchpad. It is really "vm.mmap_min_adr" adn commenting it out solved my problem.

As I see, install script of wine1.2 installs "/etc/sysctl.d/30-wine.conf" which have "vm.mmap_min_adr=0" key inside so I think it is key duplication error ( installation script must do some checkings on this ) and it breaks because of this duplication in local command oriented conf file and global sysctl.conf

Here is my current "/etc/sysctl.conf":

#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#

#kernel.domainname = example.com

# Uncomment the following to stop low-level messages on console
#kernel.printk = 4 4 1 7

##############################################################3
# Functions previously found in netbase
#

# Uncomment the next two lines to enable Spoof protection (reverse-path filter)
# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks
#net.ipv4.conf.default.rp_filter=1
#net.ipv4.conf.all.rp_filter=1

# Uncomment the next line to enable TCP/IP SYN cookies
# This disables TCP Window Scaling (http://lkml.org/lkml/2008/2/5/167),
# and is not recommended.
#net.ipv4.tcp_syncookies=1

# Uncomment the next line to enable packet forwarding for IPv4
#net.ipv4.ip_forward=1

# Uncomment the next line to enable packet forwarding for IPv6
#net.ipv6.conf.all.forwarding=1

###################################################################
# Additional settings - these settings can improve the network
# security of the host and prevent against some network attacks
# including spoofing attacks and man in the middle attacks through
# redirection. Some network environments, however, require that these
# settings are disabled so review and enable them as needed.
#
# Ignore ICMP broadcasts
#net.ipv4.icmp_echo_ignore_broadcasts = 1
#
# Ignore bogus ICMP errors
#net.ipv4.icmp_ignore_bogus_error_responses = 1
#
# Do not accept ICMP redirects (prevent MITM attacks)
#net.ipv4.conf.all.accept_redirects = 0
#net.ipv6.conf.all.accept_redirects = 0
# _or_
# Accept ICMP redirects only for gateways listed in our default
# gateway list (enabled by default)
# net.ipv4.conf.all.secure_redirects = 1
#
# Do not send ICMP redirects (we are not a router)
#net.ipv4.conf.all.send_redirects = 0
#
# Do not accept IP source route packets (we are not a router)
#net.ipv4.conf.all.accept_source_route = 0
#net.ipv6.conf.all.accept_source_route = 0
#
# Log Martian Packets
#net.ipv4.conf.all.log_martians = 1
#
# The contents of /proc/<pid>/maps and smaps files are only visible to
# readers that are allowed to ptrace() the process
# kernel.maps_protect = 1

# Scratchbox2
#vm.mmap_min_adr=4096
#vm.vdso=0

Revision history for this message
Scott Ritchie (scottritchie) wrote :

Where's the duplication? Everything in you sysctl.conf file is commented out. Also there were two typos in your original post (n->m and only one d).

Granted, it's a problem that typos could even cause it to fail to install - invalid keys shouldn't break the package install. I can work around the failing daemon startup in the package install script (since the script calls a failing procps and this is what causes apt to die), but this is a bit hackish (start procps || true).

Relatedly, the technical board agenda for their next meeting includes a discussion on how to best handle failing maintainer scripts.

Revision history for this message
dk75 (amidk75) wrote :

gosh, is my english that really bad?

I said that I've done typos posting key name in first post but in sysctl.conf it was without typos.
And now it is commented out and that why wine1.2 installed without problem.

Problem wasn't a typo because it was only in my message not in sysctl.conf

Now read other people messages - they posted its own sysctl.conf
Every one had "vm.mmap_min_adr=0" ( probably from old Jaunty wine installer script ) and this same key is in "/etc/sysctl.d/30-wine.conf" but you can only see that when wine1.2 is installed properly. If not there is no "/etc/sysctl.d/30-wine.conf" and thus nobony can tell that it is a problem.

I figured it out because I've seen posts about sysctl.conf here and remembered that at saturday I've edited it from oryginal state. Now, what you see in prevoius my message is almost oryginal state ( except for #Scratchbox2" part and everything below ) and only after commenting out "vm.mmap_min_adr" in sysctl.conf I was able to install wine1.2

Typos is not an issue. There was no typos. I've only made typos posting there ( launchpad ). Only there.
Again. Only there.
Duplication WAS one "vm.mmap_min_adr=4096" in "/etc/sysctl.conf" and second "vm.mmap_min_adr=0" in "/etc/sysctl.d/30-wine.conf" and that must be reason because durring failed installation there was no "/etc/sysctl.d/30-wine.conf" at all thereafter.
I am clear now? I am understandable now?
No one can change anything in "30-wine.conf" before installation except for pakage maintainer so it's only one way to test it - comment out "vm.mmap_min_adr=0" in "/etc/sysctl.conf"

So, if anyone there who has wine1.2 installing problem could check it out...

Revision history for this message
Gareth Jones (garethj) wrote :

Commenting out the following (from comment #11) and reinstalling wine-1.2 solved the problem and resulted in a successful wine installation:

kernel.maps_protect = 1
sys.kernel.maps_protect = 1
net.ipv4.ip_always_defrag = 1

I uncommented them afterwards and didn't run 'start procps' at any point.

Just commenting out just vm.mmap_min_adr as per comment #30 did not work for me.

Revision history for this message
Jan Vlnas (jnv) wrote :

It seems that *any* custom configuration causes installation failure.
In my case, I had to comment out the contents of /etc/sysctl.d/60-local.conf:

net.ipv4.tcp_timestamps = 0
net.ipv4.tcp_sack = 1
net.ipv4.tcp_no_metrics_save = 1
net.core.netdev_max_backlog = 2000

These settings are different than those what were mentioned previously, yet after commenting them out, I successfully installed package wine1.2 -- as Gareth suggests, without even running "start procps".

Revision history for this message
Gareth Jones (garethj) wrote :

Worth noting that I have never knowingly customized this file myself. I assume if I have a custom configuration it has been done by an installed package.

Revision history for this message
rott (mrheinheimer) wrote :

Comment #11 was the right solution for me. I also had not hand-editted any of the sysctl files. This was on upgrade from Jaunty to Karmic

Revision history for this message
stolcp (fokinko) wrote :

Comment #11 worked for me as well. I also did not customize any of sysctl files

Revision history for this message
Antonio Fuentes (fuentes) wrote :

Comment #32 worked fine for me, after comment #11 didn't work.

Revision history for this message
David Robert Lewis (afrodeity) wrote :

I need to create a /etc/sysctl.d file for SheepShaver. It dies unless vm.mmap_min_addr = 0 but if I put this line in sysctl.conf, nothing happens. This used to be the fix to get the programme to run. What do I need to do to get Sheepshaver to have vm.mmap_min_addr = 0?

Revision history for this message
David Robert Lewis (afrodeity) wrote :

afrodeity@afrodeity-desktop:~$ ls -l /etc/sysctl.d
total 20
-rw-r--r-- 1 root root 77 2009-09-15 23:46 10-console-messages.conf
-rw-r--r-- 1 root root 509 2009-09-15 23:46 10-network-security.conf
-rw-r--r-- 1 root root 107 2009-11-14 07:22 30-wine.conf
-rw-r--r-- 1 root root 115 2009-12-14 16:52 70-sheepshaver.conf
-rw-r--r-- 1 root root 450 2009-09-15 23:46 README
afrodeity@afrodeity-desktop:~$ cat /etc/sysctl.d/*

# the following stops low-level messages on console
kernel.printk = 4 4 1 7

# Turn on Source Address Verification in all interfaces to
# prevent some spoofing attacks.
net.ipv4.conf.default.rp_filter=1
net.ipv4.conf.all.rp_filter=1

# Turn on SYN-flood protections. Starting with 2.6.26, there is no loss
# of TCP functionality/features under normal conditions. When flood
# protections kick in under high unanswered-SYN load, the system
# should remain more stable, with a trade off of some loss of TCP
# functionality/features (e.g. TCP Window scaling).
net.ipv4.tcp_syncookies=1
# Wine needs to access the bottom 64k of memory in order to launch
# 16 bit programs.
vm.mmap_min_addr = 0
#Sheepshaver needs to access the bottom 64k of memory in order to launch
# 16 bit programs.

vm.mmap_min_addr = 0
This directory contains settings similar to those found in /etc/sysctl.conf.
In general, files in the 10-*.conf range come from the procps package and
serve as system defaults. Other packages install their files in the
30-*.conf range, to override system defaults. End-users can use 60-*.conf
and above, or use /etc/sysctl.conf directly, which overrides anything in
this directory.

After making any changes, please run "invoke-rc.d procps start".
afrodeity@afrodeity-desktop:~$ sudo invoke-rc.d procps start
[sudo] password for afrodeity:
Rather than invoking init scripts through /etc/init.d, use the service(8)
utility, e.g. service procps start

Since the script you are attempting to invoke has been converted to an
Upstart job, you may also use the start(8) utility, e.g. start procps
procps stop/waiting
afrodeity@afrodeity-desktop:~$ start procps
start: Rejected send message, 1 matched rules; type="method_call", sender=":1.78" (uid=1000 pid=26152 comm="start) interface="com.ubuntu.Upstart0_6.Job" member="Start" error name="(unset)" requested_reply=0 destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init"))

Revision history for this message
Jan Vlnas (jnv) wrote :

David Robert Lewis: Sorry, I think your problem is not related to this bug.
Anyway, configuration "vm.mmap_min_addr = 0" is already present in your system, in 30-wine.conf. If this setting is being loaded (check it using command "sysctl vm.mmap_min_addr"), it probably doesn't work anymore. Fill the bug report for the related package or on the developers' bugtracker.

Revision history for this message
HelToupee (heltoupee) wrote :

Response to #15 -- I was getting this same error:

Errors were encountered while processing:
 wine1.2
E: Sub-process /usr/bin/dpkg returned an error code (1)

Instead of running 'sudo apt-get install wine', try 'sudo apt-get install wine1.2'. That worked for me.

Seems dpkg gets confused because it finds more than one package named 'wine', or something.

Revision history for this message
mgw (michaelweigelt) wrote :

Tried to install wine1.2 but install failed with Sub-process /usr/bin/dpkg returned an error code (1). Apparently dkpg couldn't resolve the post-installation script

Revision history for this message
mgw (michaelweigelt) wrote :

forgot: installed version of wine is 1.1.31

Revision history for this message
mgw (michaelweigelt) wrote :

Did sudo apt-get remove wine. Thereafter no install of any wine package possible both sudo wpt-get install wine and sudo apt-get install wine1.2 failed with the reported error code

Revision history for this message
mgw (michaelweigelt) wrote :

tried to comment outseveral lines in /etc/sysctl.conf as suggested above in several comments - none of these worked for me

Revision history for this message
Misha Bazanov (bmw-) wrote :

Previous version of wine (1.0.x) create file /etc/sysctl.d/30-wine.conf :

# Wine needs to access the bottom 64k of memory in order to launch
# 16 bit programs.
vm.mmap_min_addr = 0

change value to 4096 solve my problem.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wine1.2 - 1.1.36-0ubuntu2

---------------
wine1.2 (1.1.36-0ubuntu2) lucid; urgency=low

  * Port to Lucid
  * Port Kees' changes from wine package:
    * debian/{control,*.lpia}: removed lpia arch since it is not supported.
    * debian/rules: support "parallel=N" in DEB_BUILD_OPTIONS.
    * implement an execute bit checker for the Ubuntu Non-Exec Policy
    (LP: #506702):
      - debian/wine1.2.mime: update mime handlers to use new launcher.
        - fix a typo in kees patch that removed x-winexe mimetype.
      - debian/patches/nonexec-launcher.diff: use new launcher for desktop file.
    * debian/wine1.2.{postinst,preinst,postrm}: clean up old static sysctl
      files (LP: #352119).
    * debian/control, debian/wine1.2.{templates,config,postinst,postrm}: add
      debconf question for selecting a sensible mmap_min_addr system setting
      (LP: #475540).
  * debian/wine1.2.{postinst,postrm}:
    - use "start procps || true" instead of invoke-rc.d (LP: #447197)
  * debian/control: update text in wine, wine-dev, and wine-gecko to say that
    its for easing wine upgrades and not just for PPA users now.
 -- Scott Ritchie <email address hidden> Sat, 16 Jan 2010 17:12:15 -0800

Changed in wine1.2 (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
eris23 (jdkatz23) wrote :

still have problem with wine1.2 - 1.1.36-0ubuntu2 on lucid. sysctl.conf is commented out. I've tried with/without sudo 30-wine.conf file, and with/without vm.mmap_min_addr = 4096 in that file

Sky (omgee)
Changed in wine1.2 (Ubuntu):
status: Fix Released → Confirmed
status: Confirmed → Fix Released
Revision history for this message
Scott Ritchie (scottritchie) wrote :

It should be working now Eris23, is that the case for you as well?

Revision history for this message
wolfen69 (wolfen69) wrote :

I've tried everything here, and everything I found online, and still can't install wine 1.2.

I had it installed at one time, then removed it. Now I can't get it back.

Revision history for this message
James Bubeck (bubeck) wrote :

When I'm installing wine (not wine1.2) I still see complaints while it ostensibly installs (why?).

While it's bad practice to have sysctl keys set in /etc/sysctl.d/*.conf and /etc/sysctl.conf, this should not be a deal-breaker nor should it be a noise-maker for wine's installation. Here's what I get when I install -

. . .
Setting up wine (1.0.1-0ubuntu8) ...
kernel.printk = 4 4 1 7
net.ipv4.conf.default.rp_filter = 1
net.ipv4.conf.all.rp_filter = 1
net.ipv4.tcp_syncookies = 1
vm.mmap_min_addr = 0
error: "sysctl vm.dirty_writeback_centisecs" is an unknown key
dpkg: error processing wine (--configure):
 subprocess installed post-installation script returned error exit status 255
. . .

Please pardon me if the included patch introduces a BASH-ism, which I tend to add. :) This one-line change should suppress printing unnecessary sysctl output during installation, while still potentially warning the person doing the installing. In my case -

. . .
Setting up wine (1.0.1-0ubuntu9jrb) ...
error: "sysctl vm.dirty_writeback_centisecs" is an unknown key
. . .

tags: added: patch
shitshow (multi-shaft)
Changed in wine1.2 (Ubuntu):
assignee: Scott Ritchie (scottritchie) → shitshow (multi-shaft)
Revision history for this message
Duncan (purvesd) wrote : AUTO: Duncan Purves/UK/IBM is out of the office (returning 26/04/2010)

I am out of the office until 26/04/2010.

I am out of the office with limited access to e-mail therefore there will
be a delay before I can respond to your message
Best regards
Duncan

Note: This is an automated response to your message "[Bug 447197] Re:
Packages with custom /etc/sysctl.d/30-foo.conf files can fail to install:
start procps returns exit status 1" sent on 20/4/10 22:17:48.

This is the only notification you will receive while this person is away.

Revision history for this message
Loïc Minier (lool) wrote :

Please use invoke-rc.d || true; this will have the effect of "start procps" (without noisy output) if needed, but will also honor any policy-rc.d config in place, so it's better for e.g. installation in chroots. I recently switched to this in the qemu-kvm upload.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package wine - 1.0.1-0ubuntu11

---------------
wine (1.0.1-0ubuntu11) lucid; urgency=low

  * Rebuild to recreate binary Wine packages (LP: #527732)
  * Use invoke-rc.d for procps restart (LP: #447197)
 -- Scott Ritchie <email address hidden> Wed, 21 Apr 2010 16:03:34 -0700

Changed in wine (Ubuntu):
status: Triaged → Fix Released
Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

Using invoke-rc.d is incorrect for Upstart jobs, and I will burn the household pets of anyone who does it ;-)

To post a comment you must log in.