Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest MiKTeX update breaks everything #53

Closed
3 tasks done
wdscxsj opened this issue Feb 1, 2018 · 25 comments
Closed
3 tasks done

Latest MiKTeX update breaks everything #53

wdscxsj opened this issue Feb 1, 2018 · 25 comments
Assignees
Labels

Comments

@wdscxsj
Copy link

wdscxsj commented Feb 1, 2018

Bug report

Sorry for this alarming title, but let's reproduce:

  1. Install basic-miktex-2.9.6520-x64.exe.
  2. For the Windows start menu, run the Update Wizard twice. The first pass updates 3 packages and doesn't break anything. The second pass has lots of things to do:

When this pass is almost finished, an error happens:

update.log:

...
2018-02-01 10:43:35,194+0800 INFO  FileCopyPage - downloading http://mirrors.shu.edu.cn/CTAN/systems/win32/miktex/tm/packages/oberdiek.tar.lzma...
2018-02-01 10:44:01,990+0800 INFO  FileCopyPage - 15083679 bytes, 549.74 KB/Sec
2018-02-01 10:44:02,427+0800 INFO  FileCopyPage - extracting files from oberdiek.tar.lzma...
2018-02-01 10:44:03,854+0800 INFO  FileCopyPage - downloading http://mirrors.shu.edu.cn/CTAN/systems/win32/miktex/tm/packages/pstricks.tar.lzma...
2018-02-01 10:44:12,961+0800 INFO  FileCopyPage - 7165579 bytes, 768.38 KB/Sec
2018-02-01 10:44:13,007+0800 INFO  FileCopyPage - extracting files from pstricks.tar.lzma...
2018-02-01 10:44:14,081+0800 ERROR update.core - The executed process did not succeed.
2018-02-01 10:44:14,081+0800 ERROR update.core - The executed process did not succeed.
2018-02-01 10:44:14,081+0800 ERROR update.core - Data: fileName="E:\Tools\MiKTeX\miktex/bin/x64\mpm.exe", exitCode="1"
2018-02-01 10:44:14,081+0800 ERROR update.core - Data: fileName="E:\Tools\MiKTeX\miktex/bin/x64\mpm.exe", exitCode="1"
2018-02-01 10:44:14,081+0800 ERROR update.core - Source: Libraries\MiKTeX\Core\Process\Process.cpp:166
2018-02-01 10:44:14,081+0800 ERROR update.core - Source: Libraries\MiKTeX\Core\Process\Process.cpp:166
2018-02-01 10:44:14,082+0800 INFO  FileCopyPage - 
2018-02-01 10:44:14,082+0800 INFO  FileCopyPage - Error: The executed process did not succeed.

After this, latex, pdflatex, xelatex etc. fail to work (xelatex --version is fine, though):

I tried on my laptop (update from a healthy installation) and a desktop (clean installation and update), both running Windows 10. Sometimes the second pass goes as far as extracting zhnumber.tar.lzma:

...
2018-01-31 22:47:56,770+0800 INFO  FileCopyPage - extracting files from miktex-zzip-bin-x64-2.9.tar.lzma...
2018-01-31 22:47:56,801+0800 INFO  FileCopyPage - downloading https://mirrors.cqu.edu.cn/CTAN/systems/win32/miktex/tm/packages/oberdiek.tar.lzma...
2018-01-31 22:48:35,738+0800 INFO  FileCopyPage - 15083679 bytes, 378.36 KB/Sec
2018-01-31 22:48:36,150+0800 INFO  FileCopyPage - extracting files from oberdiek.tar.lzma...
2018-01-31 22:48:37,718+0800 INFO  FileCopyPage - downloading https://mirrors.cqu.edu.cn/CTAN/systems/win32/miktex/tm/packages/zhnumber.tar.lzma...
2018-01-31 22:48:38,724+0800 INFO  FileCopyPage - 291102 bytes, 281.19 KB/Sec
2018-01-31 22:48:38,740+0800 INFO  FileCopyPage - extracting files from zhnumber.tar.lzma...
2018-01-31 22:48:39,403+0800 ERROR update.core - The executed process did not succeed.
2018-01-31 22:48:39,403+0800 ERROR update.core - The executed process did not succeed.
2018-01-31 22:48:39,403+0800 ERROR update.core - Data: fileName="C:\Tools\MiKTeX\miktex/bin/x64\mpm.exe", exitCode="1"
2018-01-31 22:48:39,403+0800 ERROR update.core - Data: fileName="C:\Tools\MiKTeX\miktex/bin/x64\mpm.exe", exitCode="1"
2018-01-31 22:48:39,403+0800 ERROR update.core - Source: Libraries\MiKTeX\Core\Process\Process.cpp:166
2018-01-31 22:48:39,403+0800 ERROR update.core - Source: Libraries\MiKTeX\Core\Process\Process.cpp:166
2018-01-31 22:48:39,403+0800 INFO  FileCopyPage - 
2018-01-31 22:48:39,403+0800 INFO  FileCopyPage - Error: The executed process did not succeed.

I guess it's the latest change to mpm that causes such errors. Any suggestion is welcome. Thanks!

My check list

  • latest package versions are installed
  • MiKTeX log files are attached
  • the bug can be reproduced by anybody (necessary input files are attached)
@wdscxsj wdscxsj changed the title Latest MikTeX update breaks everything Latest MiKTeX update breaks everything Feb 1, 2018
@edocevoli
Copy link
Member

This seems to be a dup of #52. Please try to execute the workaround.

@wdscxsj
Copy link
Author

wdscxsj commented Feb 1, 2018

I don't think this is a dup of #52. I tried the proposed workaround before posting this one, and just tried it again (and failed all the same). First, my installation path is not ended with texmf. Please also note that my error logs point to Process.cpp:166 rather than winProcess.cpp:256 in #52. Thanks.

@edocevoli
Copy link
Member

You are right. Then please attach the log files (esp. the mpm log file).

@edocevoli edocevoli reopened this Feb 1, 2018
@edocevoli edocevoli self-assigned this Feb 1, 2018
@edocevoli edocevoli added the bug label Feb 1, 2018
@wdscxsj
Copy link
Author

wdscxsj commented Feb 1, 2018

Where could I find the requested log files, please? The update.log is already attached (between the 2nd screenshot and the first snippet of update.log). Any further information I could provide? Thanks.

@edocevoli
Copy link
Member

You can find it in miktex\log relative to your installation root directory.

update.log is the log file of the updater. But since the actual error happens in the mpm run, we need to inspect the mpm log file.

@wdscxsj
Copy link
Author

wdscxsj commented Feb 1, 2018

Thanks for the guidance! Found them under %LOCALAPPDATA%\MiKTeX\2.9\miktex\log. Messages before yesterday are excluded from these logs:

The following logs are not attached, because they end with "finishing with exit code 0": initexmf.log, mkfntmap.log, miktex-fc-cache.log, fc-cache.log.

In xelatex.log, after an error was reported (line 34) about config.cpp:954, I tried my dummy test files:

2018-01-31 23:22:35,298+0800 INFO  xelatex - starting with command line: xelatex empty.tex
2018-01-31 23:22:35,314+0800 INFO  xelatex - allowing known shell commands
2018-01-31 23:22:35,314+0800 INFO  xelatex - enabling input (output) from (to) processes
...

Each time, xelatex.exe just crashed as the 3rd screenshot shows.

@edocevoli
Copy link
Member

Thank you. But the mpm log file does not contain an error messages. Can you take a look at E:\MiKTeX\miktex\log?

@wdscxsj
Copy link
Author

wdscxsj commented Feb 1, 2018

I just added a little detail in the previous reply. Unfortunately there is no directory E:\MiKTeX\miktex\log. I guess xelatex crashed too soon to leave anything.

@edocevoli
Copy link
Member

You can inspect the actual root directories with initexmf --report. Each root directory can have miktex\log sub-directory.

@wdscxsj
Copy link
Author

wdscxsj commented Feb 1, 2018

The E:\MiKTeX directory is from a remote desktop, and I'm posting the result from my laptop:

C:\Tmp\tmp>initexmf --report
initexmf: warning: Option --admin should be specified when running this program with administrative privileges
MiKTeX: MiKTeX 2.9.6600 64-bit
Invokers: .../ConEmu64/ConEmuC64/cmd
SharedSetup: no
SystemAdmin: yes
RootPrivileges: yes
PowerUser: no
OS: Windows 10 Enterprise, 64-bit, build 16299
Root #0: C:\Users\yyang\AppData\Roaming\MiKTeX\2.9
Root #1: C:\Users\yyang\AppData\Local\MiKTeX\2.9
Root #2: C:\Tools\MiKTeX
Root #3: C:\ProgramData\MiKTeX\2.9
Root #4: C:\Program Files\MiKTeX 2.9
UserInstall: C:\Tools\MiKTeX
UserData: C:\Users\yyang\AppData\Local\MiKTeX\2.9
UserConfig: C:\Users\yyang\AppData\Roaming\MiKTeX\2.9
CommonInstall: C:\Program Files\MiKTeX 2.9
CommonData: C:\ProgramData\MiKTeX\2.9
CommonConfig: C:\ProgramData\MiKTeX\2.9

And I just searched in Everything using a combination of "mpm log". The attached mpmcli.log is the only result.

@edocevoli
Copy link
Member

You are running the update wizard as administrator. In order to isolate the problem, we can try the following:

  1. start a command-prompt window as administrator
  2. run this command: E:\MiKTeX\miktex\bin\x64\mpm.exe --register-components --verbose

@wdscxsj
Copy link
Author

wdscxsj commented Feb 1, 2018

Thanks for your patient guidance. xelatex test.tex crashed again after running this:

C:\Tmp\tmp>C:\Tools\MiKTeX\miktex\bin\x64\mpm.exe --register-components --verbose
log4cxx: No appender could be found for logger (mpmcli).
log4cxx: Please initialize the log4cxx system properly.
Warning: Option --admin should be specified when running this program with administrative privileges
Operating on the private (per-user) MiKTeX setup
configuring fontconfig\config\fonts.conf
registering C:\Tools\MiKTeX\miktex/bin/x64\MiKTeX209-core.dll
registering C:\Tools\MiKTeX\miktex/bin/x64\MiKTeX209-core-PS.dll
registering C:\Tools\MiKTeX\miktex/bin/x64\MiKTeX209-packagemanager.dll
registering C:\Tools\MiKTeX\miktex/bin/x64\MiKTeX209-packagemanager-PS.dll

The cause is log4cxx, I suppose?

mpmcli.log:

2018-02-01 16:15:14,498+0800 INFO  mpmcli - starting: mpmcli 2.9.6545 (MiKTeX 2.9.6600 64-bit)
2018-02-01 16:15:14,498+0800 INFO  mpmcli - Operating on the private (per-user) MiKTeX setup
2018-02-01 16:15:14,498+0800 INFO  mpmcli - configuring fontconfig\config\fonts.conf
2018-02-01 16:15:14,514+0800 INFO  mpmcli - registering C:\Tools\MiKTeX\miktex/bin/x64\MiKTeX209-core.dll
2018-02-01 16:15:14,531+0800 INFO  mpmcli - registering C:\Tools\MiKTeX\miktex/bin/x64\MiKTeX209-core-PS.dll
2018-02-01 16:15:14,546+0800 INFO  mpmcli - registering C:\Tools\MiKTeX\miktex/bin/x64\MiKTeX209-packagemanager.dll
2018-02-01 16:15:14,569+0800 INFO  mpmcli - registering C:\Tools\MiKTeX\miktex/bin/x64\MiKTeX209-packagemanager-PS.dll

xelatex.log:

2018-02-01 16:15:35,420+0800 INFO  xelatex - starting with command line: xelatex test.tex
2018-02-01 16:15:35,423+0800 INFO  xelatex - allowing known shell commands
2018-02-01 16:15:35,423+0800 INFO  xelatex - enabling input (output) from (to) processes

@wdscxsj
Copy link
Author

wdscxsj commented Feb 1, 2018

Tested on the deskop, same outcome.

@edocevoli
Copy link
Member

edocevoli commented Feb 1, 2018

Good, so everything looks okay. Seems that the error does not occur anymore.

If it happens again, you should make sure that you give all information I need to reproduce the bug on my machine. At the moment I cannot, i.e., this is no a bug I can fix.

Also, I would recommend that you don't run the programs as administrator. I will soon close this ticket.

@wdscxsj
Copy link
Author

wdscxsj commented Feb 1, 2018

Sorry, the problem is still there, please see my previous reply... xelatex crashed without leaving any useful log.

@edocevoli
Copy link
Member

I see. But you should understand that I cannot fix ghost bugs, Show me how to reproduce the bug and I can continue to work on a bug fix. At the moment, I have no clues.

@wdscxsj
Copy link
Author

wdscxsj commented Feb 1, 2018

OK, but that's all I can provide to reproduce it. I'll stick to v2.9.6520 and only update non-MiKTeX packages, before the cause becomes clear and a fix is ready. Thanks for your effort.

@wdscxsj
Copy link
Author

wdscxsj commented Feb 1, 2018

Hello, if this means anything, I reinstalled v2.9.6520 and ran Update Wizard twice, this time avoiding miktex- packages in the 2nd pass. The same error occurred again when extracting pstricks.tar.lzma, and also pointing to Process.cpp:166. But after that xelatex, pdflatex, etc. work perfectly.

@edocevoli
Copy link
Member

Yes, that helps. I will try further to replicate your MiKTeX setup. IMHO running update wizard as administrator is/was the cause of the failure. You have a private MiKTeX setup. Running as administrator absolutely makes no sense in this situation. But of course, MiKTeX should be robust enough to handle this.

@wdscxsj
Copy link
Author

wdscxsj commented Feb 1, 2018

Thanks a lot. Indeed I don't understand MiKTeX's user modes well enough. When switching to MiKTeX from W32TeX, I just checked this post and thought:

  1. I'm the only user of my laptop, so install only for me.
  2. There is one and only one "MiKTeX Update" menu item -- just use it!
  3. It complains about the administrator privilege? Sure, I'm the administrator, and it works anyway!

Maybe it makes some sense now. I guess more than a few users set up this way, on purpose or by accident. Admittedly, running as a regular user is much saner, but I really hate to see UAC alerts. If only it's as sweet as sudo...

@edocevoli
Copy link
Member

edocevoli commented Feb 1, 2018

The problem is not that you are administrator (I am an admin too). The problem is, that you start the update wizard in elevated mode. I often see this in the log files:

Warning: Option --admin should be specified when running this program with administrative privileges

This indicates that the programs run elevated (with full administrator privileges). If this was malware, you would be in big trouble now.

Running programs unconditionally in elevated mode is not a good practice. If you run update wizard in user mode (non-elevated), the update will succeed (I am sure). As I said in my last comment, I will make the software more robust and a fix will be made available later this week.

@wdscxsj
Copy link
Author

wdscxsj commented Feb 1, 2018

OK, that explains the problem. UAC is turned off on my machine, so the updater always runs elevated. There is a peculiar reason why I choose to take such a risk, but that's off topic. Thanks for your time and all the effort!

@edocevoli
Copy link
Member

Very good. This explains a lot.

@edocevoli
Copy link
Member

I think this has been fixed. The updater should now finish without an error if you run it elevated on a private MiKTeX installation.

@wdscxsj
Copy link
Author

wdscxsj commented Feb 9, 2018

Fix confirmed on my laptop and deskop machines. Thank you so much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants