やるきなし

2016/08/08 09:55 / namazu2 2.0.21-15 @ Debian GNU/Linux sid (trying to overwrite '/usr/share/man/man1/mknmz.1.gz', which is also in package namazu2-index-tools 2.0.21-15)

以下のように mknmz (の man) が namazu2 と namazu2-index-tools の両方に含まれていて,upgrade できない.https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833335に bug report もされている.

Unpacking namazu2 (2.0.21-15) over (2.0.21-12) ...
dpkg: error processing archive /var/cache/apt/archives/namazu2_2.0.21-15_amd64.deb (--unpack):
 trying to overwrite '/usr/share/man/man1/mknmz.1.gz', which is also in package namazu2-index-tools 2.0.21-15
Processing triggers for man-db (2.7.5-1) ...
Errors were encountered while processing:
 /var/cache/apt/archives/namazu2_2.0.21-15_amd64.deb

たしかに apt-get source namazu2 して fakeroot -f debian/rules binary すると mknmz.1.gz が namazu2 にも namazu2-index-tools にも含まれる.詳細は見ていないが,以下で直るっぽい.

--- debian/rules        2016-08-02 16:03:17.000000000 +0900
+++ debian/rules.new    2016-08-08 10:35:16.237076456 +0900
@@ -83,7 +83,7 @@
        dh_installemacsen --priority=50

 override_dh_installman:
-       dh_installman man/mknmz.1 man/namazu.1
+       dh_installman man/namazu.1

 override_dh_link:
        -rm -rf $(CURDIR)/debian/namazu2-index-tools/usr/share/doc/namazu2-index-tools

追記(2016/08/22)

おそらく2.0.21-18 (その前に -16, -17 もあったが)で直っている気配.https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=833335はそのままfixedにならないまま残っているようですが.

2016/08/03 14:34 / iowait monitoring by MRTG

File server (RAID5 w/LUKS) の iowait がなんだかひどいので,MRTG で monitoringしようとして悩む.

OID (object identifier) は .1.3.6.1.4.1.2021.11 付近の以下を monitoring.

mrtg.cfg は http://net-snmp.sourceforge.net/tutorial/tutorial-5/mrtg/ にある通りに書けば良いらしい.なお,Debian GNU/Linux の場合の UCD-SNMP-MIB.txt の PATH は /usr/share/snmp/mibs/UCD-SNMP-MIB.txt で,これは libsnmp-base package に含まれている.ちなみに LoadMIBs に複数の MIB file を記載するには comma (,) 区切りで書く

ここで問題なのはMaxBytesで,上記URLの例ではMaxBytes[...]: 100のようになっているが,これだと ssCpuRawIdle がうまく測れない(もともと iowait を monitor しようという企画なのだが...).

ssCpuRawIdle の仕様をいろいろあたってみたのだが,/usr/share/snmp/mibs/UCD-SNMP-MIB.txt によると以下のとおり.

ssCpuRawIdle OBJECT-TYPE
    SYNTAX      Counter32
    MAX-ACCESS  read-only
    STATUS      current
    DESCRIPTION
        "The number of 'ticks' (typically 1/100s) spent
         idle.

         On a multi-processor system, the 'ssCpuRaw*'
         counters are cumulative over all CPUs, so their
         sum will typically be N*100 (for N processors)."
    ::= { systemStats 53 }

つまり MaxBytes が 100 だと invalid な数値だとして .rrd file (←私の環境ではRRDを利用している)にそもそも値が保存されない様子.ということで,monitor 対象の計算機毎に個別に設定してやる必要がある.当然ここでの CPU の数は論理プロセッサの数(コア数ではなく).たぶん上記 DESCRIPTION のとおり他の ssCpuRaw* についても同様だが,Idle は常に最大値付近の値をとるので,この問題がより顕在化しやすい.

2016/07/22 10:09 / mediawiki on Debian/GNU Linux jessie

ふと aptitude を見てみると mediawiki (1:1.19.20+dfsg-2.3) が Obsolete and Locally Created Packages に分類されていた.どうやら jessie から削除された模様

調べてみるとEarly termination of MediaWiki security supportとのことで,当初からjessieから削除予定だった模様(1.19 のセキュリティサポートがjessieの次のstretchのリリースの前,というか既に終了した模様).

ということで,mediawiki 1.27 を自前でインストールする(sid の package を持ってくることも考えたが php5 ではなく php 依存するらしく,混乱しそうなので断念).

1.19 では日本語検索のために BruteSearch を導入していたのであるが,同ページの情報によると1.23.xで動作しないとのことで,導入を見送る.

BruteSearch のかわりに Elasticsearchを導入.Install は https://www.mediawiki.org/wiki/Extension:CirrusSearch参照.設定(index生成)等はhttps://phabricator.wikimedia.org/diffusion/ECIR/browse/master/README参照.

別途 elasticsearch (java で動く deamon)を導入する必要があるが,これは Debian package でインストールする.ただし jessie で提供される 1.0.3 だと,検索してみても

An error has occurred while searching: We could not complete your search due to a temporary problem. Please try again later.

などと表示されるだけで検索できない.backports から 1.6.2+dfsg-1~bpo8+1 を install すれば (jessie でも)ちゃんと動く.

2016/07/21 16:08 / チャット・メッセンジャーアプリ

なんだかいろいろあってわけがわからない.

2016/07/15 12:01 / CacheFiles BUG (Linux 4.6.x)

Since 4.5.7 is the last release of 4.5 series, I tried to update my server to 4.6.4. However, the following disturbs my upgrading to 4.6.4.
BUG: unable to handle kernel NULL pointer dereference at 0000000000000098
IP: [<ffffffff8127343f>] cachefiles_mark_object_inactive+0x4f/0xa0
PGD 0
Oops: 0000 [#1] SMP
Modules linked in: dm_crypt dm_mod algif_skcipher af_alg rpcsec_gss_krb5 overlay squashfs ext4 crc16 jbd2 mbcache loop cpufreq_powersave cpufreq_userspace cpufreq_conservative cpufreq_ondemand cpufreq_stats binfmt_misc nfsd btrfs xor raid6_pq sg sr_mod cdrom sd_mod intel_rapl x86_pkg_temp_thermal intel_powerclamp kvm_intel kvm irqbypass crct10dif_pclmul crct10dif_common crc32_pclmul ghash_clmulni_intel sha256_ssse3 sha256_generic snd_hda_codec_hdmi drbg ansi_cprng hid_generic uas usbhid snd_hda_codec_realtek usb_storage snd_hda_codec_generic hid snd_hda_intel aesni_intel snd_hda_codec aes_x86_64 iTCO_wdt snd_hda_core ablk_helper iTCO_vendor_support snd_pcm ahci cryptd snd_timer libahci lrw nvidiafb evdev snd gf128mul libata vgastate soundcore glue_helper lpc_ich mei_me scsi_mod pcspkr acpi_cpufreq serio_raw i2c_i801 mfd_core mei shpchp tpm_tis rtc_cmos tpm button processor md_mod fbcon bitblit fbcon_rotate fbcon_ccw fbcon_ud fbcon_cw softcursor tileblit lm78 hwmon_vid f71882fg i5k_amb coretemp msr nvidia(PO) drm agpgart fuse autofs4 crc32c_intel xhci_pci ehci_pci xhci_hcd ehci_hcd usbcore usb_common
CPU: 2 PID: 926 Comm: kworker/u16:4 Tainted: P           O    4.6.4-myn-01+ #95
Hardware name: OEM something
Workqueue: fscache_object fscache_object_work_func
task: ffff88042c02f2c0 ti: ffff880425fa4000 task.ti: ffff880425fa4000
RIP: 0010:[<ffffffff8127343f>]  [<ffffffff8127343f>] cachefiles_mark_object_inactive+0x4f/0xa0
RSP: 0018:ffff880425fa7d90  EFLAGS: 00010286
RAX: 0000000000000000 RBX: ffff88042ac14400 RCX: 0000000000000034
RDX: ffff88043f7ceb10 RSI: ffff8803c219f390 RDI: ffff88043f7ceb08
RBP: ffff8803c219f280 R08: 0000000000000000 R09: 00000000000000ec
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88042ca2f000
R13: ffff88042ac14400 R14: 00000000ffffffff R15: 00000000ffffb96f
FS:  0000000000000000(0000) GS:ffff88043f480000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000098 CR3: 0000000001c06000 CR4: 00000000000406e0
Stack:
 ffff8803c219f280 ffff88042ac14400 ffffffff81271c75 ffff8803c219f280
 ffff880418c4c140 ffff8803bf985a50 ffffffff8120a74a ffff8803c219f310
 ffffffff81827580 ffff8803c219f280 000000000000006d ffffffff8120aae9
Call Trace:
 [<ffffffff81271c75>] ? cachefiles_drop_object+0xd5/0x180
 [<ffffffff8120a74a>] ? fscache_drop_object+0xda/0x260
 [<ffffffff8120aae9>] ? fscache_object_work_func+0xf9/0x460
 [<ffffffff8106e925>] ? process_one_work+0x135/0x3c0
 [<ffffffff8106ec0d>] ? worker_thread+0x5d/0x470
 [<ffffffff8106ebb0>] ? process_one_work+0x3c0/0x3c0
 [<ffffffff81073e2a>] ? kthread+0xca/0xe0
 [<ffffffff81603402>] ? ret_from_fork+0x22/0x40
 [<ffffffff81073d60>] ? kthread_create_on_node+0x170/0x170
Code: 11 09 00 48 8d bd 10 01 00 00 f0 80 a5 10 01 00 00 fe c6 83 20 01 00 00 00 31 f6 e8 7c b7 e1 ff 48 8b 85 f8 00 00 00 48 8b 40 30 <48> 8b 80 98 00 00 00 f0 48 01 83 30 01 00 00 b8 01 00 00 00 f0
RIP  [<ffffffff8127343f>] cachefiles_mark_object_inactive+0x4f/0xa0
 RSP <ffff880425fa7d90>
CR2: 0000000000000098
---[ end trace 0b204b8eafde5e55 ]---

Function cachefiles_mark_object_inactive is introduced at CacheFiles: Provide read-and-reset release counters for cachefilesd. So when I revert this commit, my linux 4.6.4 system works fine.

P.S.(2016/7/16)

My system is Debian GNU/Linux stable (jessie). The version of cachefilesd is 0.10.5-1. I may need to update this to the latest one, 0.10.9, which includes Suspend/resume culling based on recently released file/block counts.

P.S.(2016/8/23)

Altough it seems that this patch (4.7.2 version) might be related to this issue, I still got the following Oops.

BUG: unable to handle kernel NULL pointer dereference at 0000000000000098
IP: [<ffffffffa0bc386c>] cachefiles_mark_object_inactive+0x1c/0xa0 [cachefiles]
PGD 0
Oops: 0000 [#1] SMP
Modules linked in: rpcsec_gss_krb5 overlay squashfs ext4 crc16 jbd2 mbcache dm_crypt loop algif_skcipher af_alg dm_mod cpufreq_powersave cpufreq_userspace cpufreq_conservative cpufreq_ondemand cpufreq_stats binfmt_misc nfsd btrfs xor raid6_pq sg sr_mod cdrom sd_mod intel_rapl x86_pkg_temp_thermal intel_powerclamp kvm_intel kvm irqbypass crct10dif_pclmul crct10dif_common crc32_pclmul ghash_clmulni_intel drbg snd_hda_codec_hdmi ansi_cprng hid_generic usbhid uas snd_hda_codec_realtek snd_hda_codec_generic hid usb_storage snd_hda_intel aesni_intel snd_hda_codec aes_x86_64 snd_hda_core ablk_helper cryptd snd_pcm iTCO_wdt lrw ahci iTCO_vendor_support snd_timer gf128mul nvidiafb libahci evdev snd glue_helper libata vgastate soundcore pcspkr serio_raw mei_me i2c_i801 scsi_mod acpi_cpufreq lpc_ich mei shpchp mfd_core rtc_cmos tpm_tis tpm button processor cachefiles fbcon bitblit fbcon_rotate fbcon_ccw fbcon_ud fbcon_cw softcursor tileblit md_mod lm78 hwmon_vid f71882fg i5k_amb coretemp msr nvidia(PO) drm agpgart fuse autofs4 crc32c_intel xhci_pci ehci_pci xhci_hcd ehci_hcd usbcore usb_common
CPU: 2 PID: 938 Comm: kworker/u16:6 Tainted: P           O    4.7.2-myn-01+ #101
Hardware name: OEM something
Workqueue: fscache_object fscache_object_work_func
task: ffff88042c6a0f00 ti: ffff880426668000 task.ti: ffff880426668000
RIP: 0010:[<ffffffffa0bc386c>]  [<ffffffffa0bc386c>] cachefiles_mark_object_inactive+0x1c/0xa0 [cachefiles]
RSP: 0018:ffff88042666bd88  EFLAGS: 00010202
RAX: 0000000000000000 RBX: ffff88042a9b2200 RCX: 0000000200000000
RDX: ffff88042c6a0f00 RSI: ffff8803e8d122c0 RDI: ffff88042a9b2320
RBP: ffff8803e8d122c0 R08: 0000000000000000 R09: 00000000000000ec
R10: 0000000000000000 R11: 0000000000000000 R12: ffff88042ca08f00
R13: ffff88042a9b2200 R14: 00000000ffffffff R15: 00000000ffff0e67
FS:  0000000000000000(0000) GS:ffff88043f480000(0000) knlGS:0000000000000000
CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
CR2: 0000000000000098 CR3: 0000000001c06000 CR4: 00000000000406e0
Stack:
 ffff8803e8d122c0 ffff88042a9b2200 ffff88042ca08f00 ffffffffa0bc20d5
 ffff8803e8d122c0 ffff88041a336780 ffff8800ae5fb230 ffffffff81213e7a
 ffff8803e8d12350 ffffffff8182d900 ffff8803e8d122c0 000000000000006d
Call Trace:
 [<ffffffffa0bc20d5>] ? cachefiles_drop_object+0xd5/0x180 [cachefiles]
 [<ffffffff81213e7a>] ? fscache_drop_object+0xda/0x260
 [<ffffffff81214219>] ? fscache_object_work_func+0xf9/0x460
 [<ffffffff810738f5>] ? process_one_work+0x135/0x3c0
 [<ffffffff81073bdd>] ? worker_thread+0x5d/0x470
 [<ffffffff81073b80>] ? process_one_work+0x3c0/0x3c0
 [<ffffffff81078dda>] ? kthread+0xca/0xe0
 [<ffffffff8161063f>] ? ret_from_fork+0x1f/0x40
 [<ffffffff81078d10>] ? kthread_create_on_node+0x170/0x170
Code: 8d fe ff ff 66 66 2e 0f 1f 84 00 00 00 00 00 41 54 55 48 89 f5 53 48 8b 86 f8 00 00 00 48 89 fb 48 8d bf 20 01 00 00 48 8b 40 30 <4c> 8b a0 98 00 00 00 e8 88 ca a4 e0 48 8d bd 28 01 00 00 48 8d
RIP  [<ffffffffa0bc386c>] cachefiles_mark_object_inactive+0x1c/0xa0 [cachefiles]
 RSP <ffff88042666bd88>
CR2: 0000000000000098
---[ end trace b0980ebb0851d8ca ]---