start

システムフォントをNotoにしてるとVisual Studio 2013がインストールできない件

Windows 10のシステムフォントを書き換えてNoto Sans CJKにしてるとVisual Studio 2013がインストール出来ないっぽい。

インストーラであるvs_community.exeを実行すると、画面中央に「Visual Studio」ロゴが表示された後、お馴染みの縦長インストーラUIが出るんだけれども、ただの真っ黒ウィンドウで1分程すると勝手に終了してしまう。

プロパティから「互換モードでこのプログラムを実行する」にチェックを入れて起動すると、画面は正しく出るものの今度は互換性エンジンが云々でインストールが出来ない。これは既知の問題というか、そういう仕様っぽいのである意味正常。

%TEMP%に作られるインストーラのログ(dd_vs_community_日付.logってファイル)を見たら
「[4F88:2824][2019-08-17T11:40:29]e000: MUX: ERROR: 'file:///C:/WINDOWS/FONTS/NotoSansCJKjp-Regular.otf' ファイルは、予測されるファイル形式の仕様に準拠していません。」
という怪しげな一文が…!当該箇所のログ全文は↓の通り。どう見てもフォントのインスタンスを作ってるっぽい所で落ちてる。

[4F88:2824][2019-08-17T11:40:29]e000: MUX:  ERROR: 'file:///C:/WINDOWS/FONTS/NotoSansCJKjp-Regular.otf' ファイルは、予測されるファイル形式の仕様に準拠していません。
[4F88:2824][2019-08-17T11:40:29]e000: MUX:  Stack:    場所 Adobe.CffRasterizer.OTFRasterizer.MapErrorCode(AdobeErrorCode error)
   場所 Adobe.CffRasterizer.OTFRasterizer.NewFont(UnmanagedMemoryStream fontFileStream, Uri sourceUri, Int32 faceIndex)
   場所 MS.Internal.FontFace.TrueTypeFontDriver.ReadCFFMetrics(FontFaceLayoutInfo cache, Boolean vmtxPresent, UInt16 typoAscent, UInt16 typoDescent)
   場所 MS.Internal.FontFace.TrueTypeFontDriver.ReadGlyfMetrics(FontFaceLayoutInfo cache, UInt16 indexToLocFormat, Boolean vmtxPresent, UInt16 typoAscent, UInt16 typoDescent)
   場所 MS.Internal.FontFace.TrueTypeFontDriver.ReadAdvances(FontFaceLayoutInfo cache, CheckedPointer hmtxTable, UInt16 numberOfMetrics, UInt16 indexToLocFormat, UInt16 typoAscent, UInt16 typoDescent)
   場所 MS.Internal.FontFace.TrueTypeFontDriver.GetLayoutFontFaceInfo(FontFaceLayoutInfo cache)
   場所 MS.Internal.FontCache.FontFaceLayoutInfo.MS.Internal.FontCache.IFontCacheElement.AddToCache(CheckedPointer newPointer, ElementCacher cacher)
   場所 MS.Internal.FontCache.HashTable.Lookup(IFontCacheElement e, Boolean add)
   場所 MS.Internal.FontCache.CacheManager.Lookup(IFontCacheElement e)
   場所 System.Windows.Media.GlyphTypeface.Initialize(Uri typefaceSource, StyleSimulations styleSimulations, Boolean fromPublic)
   場所 MS.Internal.FontCache.CachedFontFace.CreateGlyphTypeface()
   場所 MS.Internal.FontFace.PhysicalFontFamily.GetGlyphTypeface(FontStyle style, FontWeight weight, FontStretch stretch)
   場所 MS.Internal.FontFace.PhysicalFontFamily.MS.Internal.FontFace.IFontFamily.GetTypefaceMetrics(FontStyle style, FontWeight weight, FontStretch stretch)
   場所 System.Windows.Media.Typeface.ConstructCachedTypeface()
   場所 System.Windows.Media.Typeface.get_CachedTypeface()
   場所 System.Windows.Media.Typeface.CheckFastPathNominalGlyphs(CharacterBufferRange charBufferRange, Double emSize, Double widthMax, Boolean keepAWord, Boolean numberSubstitution, CultureInfo cultureInfo, Int32& stringLengthFit)
   場所 MS.Internal.TextFormatting.SimpleRun.CreateSimpleTextRun(CharacterBufferRange charBufferRange, TextRun textRun, TextFormatterImp formatter, Int32 widthLeft, Boolean emergencyWrap)
   場所 MS.Internal.TextFormatting.SimpleRun.Create(FormatSettings settings, CharacterBufferRange charString, TextRun textRun, Int32 runLength, Int32 widthLeft)
   場所 MS.Internal.TextFormatting.SimpleRun.Create(FormatSettings settings, Int32 cp, Int32 cpFirst, Int32 widthLeft, Int32 widthMax)
   場所 MS.Internal.TextFormatting.SimpleTextLine.Create(FormatSettings settings, Int32 cpFirst, Int32 paragraphWidth)
   場所 MS.Internal.TextFormatting.TextFormatterImp.FormatLineInternal(TextSource textSource, Int32 firstCharIndex, Int32 lineLength, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak, TextRunCache textRunCache)
   場所 MS.Internal.TextFormatting.TextFormatterImp.FormatLine(TextSource textSource, Int32 firstCharIndex, Double paragraphWidth, TextParagraphProperties paragraphProperties, TextLineBreak previousLineBreak, TextRunCache textRunCache)
   場所 System.Windows.Controls.TextBlock.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 System.Windows.Controls.StackPanel.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 System.Windows.Controls.Grid.MeasureCell(Int32 cell, Boolean forceInfinityV)
   場所 System.Windows.Controls.Grid.MeasureCellsGroup(Int32 cellsHead, Size referenceSize, Boolean ignoreDesiredSizeU, Boolean forceInfinityV)
   場所 System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 MS.Internal.Helper.MeasureElementWithSingleChild(UIElement element, Size constraint)
   場所 System.Windows.Controls.ContentPresenter.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 System.Windows.Controls.Border.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 System.Windows.Controls.Control.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 System.Windows.Controls.Decorator.MeasureOverride(Size constraint)
   場所 System.Windows.Documents.AdornerDecorator.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 System.Windows.Controls.Grid.MeasureOverride(Size constraint)
   場所 System.Windows.FrameworkElement.MeasureCore(Size availableSize)
   場所 System.Windows.UIElement.Measure(Size availableSize)
   場所 System.Windows.ContextLayoutManager.UpdateLayout()
   場所 System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
   場所 System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
   場所 System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
   場所 System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
   場所 System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
   場所 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   場所 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   場所 System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   場所 System.Windows.Threading.DispatcherOperation.InvokeImpl()
   場所 System.Windows.Threading.DispatcherOperation.InvokeInSecurityContext(Object state)
   場所 System.Threading.ExecutionContext.runTryCode(Object userData)
   場所 System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
   場所 System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
   場所 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   場所 System.Windows.Threading.DispatcherOperation.Invoke()
   場所 System.Windows.Threading.Dispatcher.ProcessQueue()
   場所 System.Windows.Threading.Dispatcher.WndProcHook(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   場所 MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
   場所 MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
   場所 System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Boolean isSingleParameter)
   場所 System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   場所 System.Windows.Threading.Dispatcher.WrappedInvoke(Delegate callback, Object args, Boolean isSingleParameter, Delegate catchHandler)
   場所 System.Windows.Threading.Dispatcher.InvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Boolean isSingleParameter)
   場所 System.Windows.Threading.Dispatcher.Invoke(DispatcherPriority priority, Delegate method, Object arg)
   場所 MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   場所 MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
   場所 System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
   場所 System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
   場所 System.Windows.Threading.Dispatcher.Run()
   場所 Microsoft.Devdiv.Bootstrapper.ManagedUx.RunUI(ViewModelCommonUi viewModel)
   場所 Microsoft.Devdiv.Bootstrapper.ManagedUx.InternalRun()
   場所 Microsoft.Devdiv.Bootstrapper.ManagedUx.Run()
   場所 System.Threading.ThreadHelper.ThreadStart_Context(Object state)
   場所 System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
   場所 System.Threading.ThreadHelper.ThreadStart()

まさかと思ってシステムフォントを標準のYu Gothic UIに戻してみたら無事インストーラが立ち上がった。マジかよーって感じ。

確認してないけど、Notoの問題ってよりシステムフォントにOTF指定したのが不味いのかも?とりあえず無事インスコ出来てよかった。



FreeBSD PortsにFlavorsなる仕組みが出来てた

graphics/pecl-imagickをインストールしようとFreshPortsでportの情報見てたら、“Package flavors”なる項目があるのに気付いた。

ハンドブックによれば、Flavorsとは1つのportに複数のバリエーションを持たせる方法とのこと。多くの機能といくらかのパッケージ依存関係を持つノーマルバージョンと、最低限の機能と依存関係しかない軽量バージョンの2つのFlavorをportに持たせるとか、GUIツールキット毎にFlavorを分けるとか、そういう使い方を想定しているようだ。

2017-11-30にリリースされた仕組みで、どうやらPythonモジュール関連portsの整理かなんかで導入された雰囲気(一次情報を追ったわけではないので当てずっぽう。同日にpy36-*のportsは全てFlavor化されpy-*に統合されている)。

件のpecl-imagickについて言えば、php71/php72/php73とPHPのバージョンごとにFlavorが用意されている(2019-08-15現在)。Flavorの有無はそれぞれのportのディレクトリでmake pretty-flavors-package-namesとすると確認できる。

$ cd /usr/ports/graphics/pecl-imagick
$ make pretty-flavors-package-names
php73: php73-pecl-imagick-3.4.4
php71: php71-pecl-imagick-3.4.4
php72: php72-pecl-imagick-3.4.4

Flavorの指定はmakeでFLAVOR変数に渡せばおk。

# make FLAVOR=php73

これはなかなか便利ですな。

以前は、lang/php71を使いたいのにPECL拡張モジュールのportはPHP 5.6向けになってて、PHP 7.1用には自前でpeclコマンド叩いて入れなきゃならないって事があったけど、Flavor使えばports/packagesにおんぶにだっこできて楽チン。

あ、書いてて思い出したけど、Flavor付きのportはFlavorごとにpackageが分かれる点は留意の必要あり。上のコマンド例で分かる通り、php73フレーバーでpecl-imagickをインストールした場合、パッケージ名はphp73-pecl-imagickとなる。

FreeBSDのMariaDBでリモートクライアントからの接続を許可する

A5:SQL Mk-2を使って、実家からVPN経由で自宅鯖のMariaDBにアクセスしようとしたら「Access denied for user'xxxx'」と言われて繋がらなかった。デフォルトでは自ホストのクライアントからの接続しか許可してないらしいので、リモートクライアントからの接続を許可してみたメモ。丁寧なhttps://mariadb.com/kb/en/library/training-tutorials/basic-mariadb-articles/configuring-mariadb-for-remote-client-access/公式ドキュメントが用意されてるので、その通りに進めていくだけですけどね。

'my.cnf[mysqld]''セクションに以下の2行を追加する。

[mysqld]
skip-networking=0
skip-bind-address

ユーザーにリモート接続の権限を付加する。許可するホストとパスワードを追加してるっぽいので、接続元ごとにパスワードを変えられるっぽい?

GRANT ALL PRIVILEGES ON *.* TO 'root'@'172.16.%' IDENTIFIED BY 'new-password' WITH GRANT OPTION;

こんな感じで追加されてればおk。

> SELECT user,host FROM mysql.user;
+--------------+-----------+
| user         | host      |
+--------------+-----------+
| root         | 127.0.0.1 |
| root         | 172.16.%  | ←これ



FreeBSDのZFS実装がZFS on Linuxベースに変更されるらしい

2021-01-28現在、ZFS on LinuxはOpenZFSと名前を変え2.0.1がリリース済みである。

FreeBSDの移行作業も着々と進んでおり、13-RELEASEでは新生OpenZFSベースとなるのがほぼ確実といったところ。

昨年末の話題ではあるけど、将来的にFreeBSDのZFSシステムがZFS on Linuxベースに変更されるらしい。メーリングリストを読む限り、Delphix社がZFS開発の軸をZFS on Linux(以下ZoLと表記)に移したことが発端となっているようだ。

これまで、OpenZFSの盟主たるDelphix社1)は、illumosからフォークした自社のDelphix OS用にZFSを改良し、それがOpenZFSに取り込まれてきた。現在のFreeBSDのZFS実装はillumosのコードがベースとなっており、FreeBSD用に多数のifdefを加えたものだそうだ。illumosという共通の祖先を持っていたからこそ、Delphixの改良がFreeBSDに取り込めてきたというわけだ。

ところが、前述の通りDelphixがZoLに移行したことで、illumosベースのZFS実装の改修が止まってしまった。現状、ZoLで行われた修正のillumosへのバックポートは全く行われていないそうである。ZoLの主要開発者であるBrian Behlendorfが、ZoLへのFreeBSD直接サポートの追加を薦めてくれたこともあり、ひとまずZoLをベースとしたZFS on FreeBSDプロジェクト、通称ZoFが立ち上がったという経緯のようだ。将来的にはZoLとZoFで1つのコードベースを共有するかもしれないとのこと。

ZoFの実装とテストはiX Systemsが主体となって行われており、既に殆ど問題なく動いているようだ。illumosの実装─界隈ではLegacy ZFSと呼ばれている─と比較してパフォーマンスも向上している模様。2019年3月1日にsysutils/zolとしてportsツリーに取り込まれ、2019年6月10日にはsysutils/openzfsへと名称変更されている。12.0-RELEASEのportsツリーにも取り込まれていることから、完成度の高さが伺える。FreeBSD 13の前にはillumosベースのZFSソースコードは削除されるだろうとのこと。


1)
自分が勝手にそう思ってるだけ

WD 8TB HDDガチャで大勝利

WDの外付けハードディスクElements Desktopシリーズの8TBモデル(型番:WDBBKG0080HBK-JESN)の中身に、エンプラ向けのWD Goldの廉価版が入ってる事があるらしい聞いて購入したみたところ、見事に大当たりのHe10なWD80EMAZ-00WJTA0だった。やったね!

ハズレの方は非ヘリウムでWD80EMAZ-00M9AA0とのこと。まぁ、ハズレと言ってもこちらもUltrastarの流れを組む製品で、ただの8TB HDDとして見ても安い部類なので十分当たりと言えるんだけども。

WD80EMAZ-00WJTA0 WD80EMAZ-00M9AA0
製品ライン Ultrastar DC HC510? Ultrastar DC HC320?
ヘリウム ×

非ヘリウムのWD80EMAZ-00M9AA0の方が静かで低発熱という話もあり、一概に当たりハズレとは言えないかも。自分的にはHUH728080ALE604で既にヘリウム体験済みなので、WD80EMAZ-00WJTA0にそれほど強いこだわりはなかったりする。

電源として3.3Vが来てるとHDDが起動しないらしく、うちのSuperChassis 743TQ-1200B-SQのHDDベイで使えるか心配だったけど、余裕のよっちゃんで使えた。すなわち、SUPERMICROのバックプレーンCSE-SAS-743TQでは使えると考えて良さそう。

smartmontoolsでのS.M.A.R.T.は↓な感じ。なお、室温26℃、ディスクにフルアクセスしてる最中に取得したものである。

smartctl 7.0 2018-12-30 r4883 [FreeBSD 12.0-RELEASE-p4 amd64] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org

=== START OF INFORMATION SECTION ===
Model Family:     WDC HGST Ultrastar He10
Device Model:     WDC WD80EMAZ-00WJTA0
Serial Number:    7HKJKU1N
LU WWN Device Id: 5 000cca 257f1cf4c
Firmware Version: 83.H0A83
User Capacity:    8,001,563,222,016 bytes [8.00 TB]
Sector Sizes:     512 bytes logical, 4096 bytes physical
Rotation Rate:    5400 rpm
Form Factor:      3.5 inches
Device is:        In smartctl database [for details use: -P show]
ATA Version is:   ACS-2, ATA8-ACS T13/1699-D revision 4
SATA Version is:  SATA 3.2, 6.0 Gb/s (current: 6.0 Gb/s)
Local Time is:    Mon Jul 22 00:29:58 2019 JST
SMART support is: Available - device has SMART capability.
SMART support is: Enabled

=== START OF READ SMART DATA SECTION ===
SMART overall-health self-assessment test result: PASSED

General SMART Values:
Offline data collection status:  (0x80) Offline data collection activity
                                        was never started.
                                        Auto Offline Data Collection: Enabled.
Self-test execution status:      (   0) The previous self-test routine completed
                                        without error or no self-test has ever
                                        been run.
Total time to complete Offline
data collection:                (   93) seconds.
Offline data collection
capabilities:                    (0x5b) SMART execute Offline immediate.
                                        Auto Offline data collection on/off support.
                                        Suspend Offline collection upon new
                                        command.
                                        Offline surface scan supported.
                                        Self-test supported.
                                        No Conveyance Self-test supported.
                                        Selective Self-test supported.
SMART capabilities:            (0x0003) Saves SMART data before entering
                                        power-saving mode.
                                        Supports SMART auto save timer.
Error logging capability:        (0x01) Error logging supported.
                                        General Purpose Logging supported.
Short self-test routine
recommended polling time:        (   2) minutes.
Extended self-test routine
recommended polling time:        (1215) minutes.
SCT capabilities:              (0x003d) SCT Status supported.
                                        SCT Error Recovery Control supported.
                                        SCT Feature Control supported.
                                        SCT Data Table supported.

SMART Attributes Data Structure revision number: 16
Vendor Specific SMART Attributes with Thresholds:
ID# ATTRIBUTE_NAME          FLAG     VALUE WORST THRESH TYPE      UPDATED  WHEN_FAILED RAW_VALUE
  1 Raw_Read_Error_Rate     0x000b   100   100   016    Pre-fail  Always       -       0
  2 Throughput_Performance  0x0004   129   129   054    Old_age   Offline      -       112
  3 Spin_Up_Time            0x0007   151   151   024    Pre-fail  Always       -       435 (Average 436)
  4 Start_Stop_Count        0x0012   100   100   000    Old_age   Always       -       165
  5 Reallocated_Sector_Ct   0x0033   100   100   005    Pre-fail  Always       -       0
  7 Seek_Error_Rate         0x000a   100   100   067    Old_age   Always       -       0
  8 Seek_Time_Performance   0x0004   128   128   020    Old_age   Offline      -       18
  9 Power_On_Hours          0x0012   100   100   000    Old_age   Always       -       141
 10 Spin_Retry_Count        0x0012   100   100   060    Old_age   Always       -       0
 12 Power_Cycle_Count       0x0032   100   100   000    Old_age   Always       -       165
 22 Helium_Level            0x0023   100   100   025    Pre-fail  Always       -       100
192 Power-Off_Retract_Count 0x0032   100   100   000    Old_age   Always       -       165
193 Load_Cycle_Count        0x0012   100   100   000    Old_age   Always       -       165
194 Temperature_Celsius     0x0002   154   154   000    Old_age   Always       -       43 (Min/Max 25/53)
196 Reallocated_Event_Count 0x0032   100   100   000    Old_age   Always       -       0
197 Current_Pending_Sector  0x0022   100   100   000    Old_age   Always       -       0
198 Offline_Uncorrectable   0x0008   100   100   000    Old_age   Offline      -       0
199 UDMA_CRC_Error_Count    0x000a   200   200   000    Old_age   Always       -       0

SMART Error Log Version: 1
No Errors Logged

SMART Self-test log structure revision number 1
No self-tests have been logged.  [To run self-tests, use: smartctl -t]

SMART Selective self-test log data structure revision number 1
 SPAN  MIN_LBA  MAX_LBA  CURRENT_TEST_STATUS
    1        0        0  Not_testing
    2        0        0  Not_testing
    3        0        0  Not_testing
    4        0        0  Not_testing
    5        0        0  Not_testing
Selective self-test flags (0x0):
  After scanning selected spans, do NOT read-scan remainder of disk.
If Selective self-test is pending on power-up, resume after 0 minute delay.
  • start.txt
  • 最終更新: 2022-07-27 15:26
  • by Decomo