NetBSD Problem Report #48065

From kardel@pip.acrys.com  Fri Jul 19 07:33:45 2013
Return-Path: <kardel@pip.acrys.com>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "Postmaster NetBSD.org" (verified OK))
	by mollari.NetBSD.org (Postfix) with ESMTPS id 3ABA171BDA
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 19 Jul 2013 07:33:45 +0000 (UTC)
Message-Id: <201307190733.r6J7XbV8014790@pip.acrys.com>
Date: Fri, 19 Jul 2013 09:33:37 +0200 (CEST)
From: kardel@netbsd.org
Reply-To: kardel@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: swapctl -d path dangerous?
X-Send-Pr-Version: 3.95

>Number:         48065
>Category:       kern
>Synopsis:       swapctl -d path seems to cause data inconsistencies
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Jul 19 07:35:00 +0000 2013
>Closed-Date:    Wed Mar 29 10:16:08 +0000 2017
>Last-Modified:  Wed Mar 29 10:16:08 +0000 2017
>Originator:     Frank Kardel
>Release:        NetBSD 6.99.20
>Organization:

>Environment:


System: NetBSD pip.kardel.name 6.99.20 NetBSD 6.99.20 (PIPGEN) #34: Sun May 26 16:57:25 CEST 2013 ... amd64
Architecture: x86_64
Machine: amd64
>Description:
	While running vm-heavy postgresl load jobs (open streetmap planet load) the
	command swapctl -d /dev/<some swap device> often leads to a postgresql (9.2)
	abort due to an unexpected zero page block.
>How-To-Repeat:
	run an open streetmap planet load with swap on mechanical disks (being used for
	paging) add swap from an SSD device and delete swap from mechanical device causing
	massive page-in from the mechanical device. Watch postgresql abort over
2013-07-17T06:35:46.302452+02:00 pip.kardel.name postgres 7165 - - [6-1] ERROR:  index "planet_osm_roads_index" contains unexpected zero page at block 1844
2013-07-17T06:35:46.302638+02:00 pip.kardel.name postgres 7165 - - [6-2] HINT:  Please REINDEX it.
2013-07-17T06:35:46.302667+02:00 pip.kardel.name postgres 7165 - - [6-3] CONTEXT:  COPY planet_osm_roads, line 1448077: "33138513       \N      \N      \N      \N      \N      \N      \N      \N      \N      \N      \N      \N      \N      \N      \N      \N      \N      \N      \N      \N      \N      \N      \N      \N      \N      primary \N      \N      \N..."
2013-07-17T06:35:46.302696+02:00 pip.kardel.name postgres 7165 - - [6-4] STATEMENT:  COPY planet_osm_roads (osm_id,"access","ad....
	I have seen that twice. If the load runs without a swapctl -d the load succeeds.
>Fix:
	Don't use swapctl -d unless the swap space on that device is not used.

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: kardel@NetBSD.org
State-Changed-When: Wed, 29 Mar 2017 10:16:08 +0000
State-Changed-Why:
timeout - need to be re-evaluated with current codebase - closed be submitter (me)


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.