Message Boards Message Boards

0
|
9775 Views
|
12 Replies
|
2 Total Likes
View groups...
Share
Share this post:

Mathematica closing kernels

Posted 4 years ago

Mathematica has been closing the kernel mid-way through evaluating a notebook, exactly as if I had done Evaluate > Quit Kernel. This happens seemingly at random every 3 hours or so and if I re-evaluate the notebook it usually runs fine.

It has been happening ever since version 11.2 and now I am trying 12.1, but this still has the same problem.

It has affected installations on several different Windows PCs and on many different notebooks, but never happened in 11.1 and prior.

It has been the subject of numerous technical support inquiries, but its random nature means it is not repeatable.

Has anyone else had this problem and found a solution?

POSTED BY: roger 567
12 Replies
Posted 4 years ago

Hello Roger,

I certainly feel for you. You clearly have a problem which can't be assigned to the computer hardware, since it has occurred with different computers. At the same time, it cannot be common. I use Mathematica daily, and read both this forum and StackExchange regularly, and I have never encountered it myself or in another case on a forum. (I have experienced Mathematica crashes, but VERY infrequently.)

Modern operating systems are supposed to prevent this -- but is it possible Mathematica has a conflict with some other installed program or driver? If so, it would need to be a program you have installed on every computer exhibiting the issue, and also a program not commonly used, or we would hear from other users with the same issue.

POSTED BY: David Keith
Posted 4 years ago

Yes, it is possible. Indeed there has to be something very unusual about what I am doing.

The only software I can think of common to all 4 PCs were MS Office, Visual Studio and Eclipse, Chrome and Acrobat Reader all of which I would expect many Mathematica users to also use. Also Norton Internet Security would be on all of them.

One of the 4 PCs is only accessible through a remote desktop and has no graphics card, so I can cross off a wide range of video and graphics-intensive programmes or games that would never have been installed there.

In the past, I thought it could be a MariaDB JDBC driver as the vast majority of my notebooks read from a centralised database and this driver would be on all PCs, but later I have had examples fail that didn't use the database at all and the failures were certainly not commonly happening during database functions or commands in Mathematica.

I also wondered about network devices, especially printers and have tried removing these from the PC I am currently using, but haven't found a culprit yet.

However, I think your direction is a good one to reflect on.

POSTED BY: roger 567
Posted 4 years ago

Thanks for your comments, but I fear you are barking up the wrong tree. This has happened on dozens of notebooks, on 4 different PCs and on 4 different versions of Mathematica (11.2-12.1). Yet it has never happened in exactly the same place twice and every time I recalculated or closed and reloaded, it either worked fine or failed somewhere else in the notebook. It has never happened on 11.1, which is the only version that I can use, so I use it all the time. None of that would be the case for a syntax error or two.

The simplest example I have ever seen it happen on was a single cell

x=5;
x

which replied x once and 5 every other time. I agree that tracing errors can be difficult, but even I could manage with that example.

I don't know if I have a pre-release version of 12.1 - it was what Wolfram sent me to evaluate, but it has been the same for 11.2,11.3 and 12.0.

This has been going on for years (when did 11.2 come out? 2017?) and I was hoping that there was someone who had experienced the same, who had got further in finding a solution.

POSTED BY: roger 567

Is there any chance you can pare down to a smallish example? It is likely to be something along the lines suggested by Szabolcs Horvat. So the smaller the MCE ("minimal crashing example") the better, in terms of likelihood we might track it down.

POSTED BY: Daniel Lichtblau

Since people start to comment on this, it is good to point out that Roger may be using an early prerelease of 12.1, see my comment on https://community.wolfram.com/groups/-/m/t/1934409

POSTED BY: Szabolcs Horvát
Anonymous User
Anonymous User
Posted 4 years ago

Mathematica Kernel will quit due to "a malformed program" and or "syntax error" in the case your running several expressions: it stops to prevent mis-use of the kernel - which could effect "other things" if it were to continue wildly (the kernel by default has access, via your code, to your disk - you wouldn't want a stray program messing your files up).

New users also tend to have problems with Context[] and "already defined variables". (they try to evaluate expressions using "x" but it is already defined, and they become confused that the result isn't what they expected)

Also - installing "malware" or poorly conceived 3rd party software can effect your OS Desktop libraries, causing unexpected closures of applications.

I will not prescribe to 12.1 has new bugs until one has been identified. We have not identified a bug nor shown it to be repeatable, here, yet.

"This happens seemingly at random every 3 hours or so and if I re-evaluate the notebook it usually runs fine."

This is the strongest clue Mathematica has nothing to do with what is going on. I strongly suspect the Mathematica app isn't the only software on your PCs that is effected.

Let me ask: do you have video drivers that update every 3 hours? your using windows10 and have enabled continual updates for drivers maybe?

POSTED BY: Anonymous User
Posted 4 years ago

I am not aware of frequent updates on drivers or Windows.

It has been an issue on 4 different PCs at different times, each with different graphics cards and motherboards.

The PC I am currently using defers Windows updates for as long as possible and I have removed all non-critical start-up programmes. It is possible that something is still updating in the background, but I have tried to prevent it.

I should also make it clear that when I say it happens every 3 hours on average, that is a long-run average with a very high standard deviation. It is not a regular event. It can happen twice in 5 minutes for not at all for a couple of days.

POSTED BY: roger 567

Is the problem appearing with every notebook you use? Or is it specific to notebooks that exercise a particular set of computations? I am guessing the latter since this does not seem to happen to other users, at least not at the rate you describe.

A further guess has two possibilities. (1) Some of your code uses functions that make themselves use time constraints internally. This can account for the stochastic nature of crashes that you experience. Again, if you can isolate an example that is likely to crash given sufficient time, we can have a look. (2) This happens when you are using a Front End and mousing around during a computation. In some cases the FE triggers a Kernel computation, and if the Kernel is in uninterruptible (e.g. library) code a lock-up can ensue. I believe most issues of this sort were addressed with the release of 12.0, but perhaps some still linger.

As currently described, the problem remains too vague to really diagnose.

POSTED BY: Daniel Lichtblau
Posted 4 years ago

I would say it happens potentially for any notebook and any calculation. If x=5; blew its mind, anything could.

I have no hope that you will be able to diagnose it on a forum. Technical support have tried several times and got nowhere. I was just hoping that someone out there had experienced the same thing and knew something about it.

You wrote that "this does not seem to happen to other users". That isn't really something you can know, except that it clearly isn't very common. Before yesterday, I presume you didn't know that it had happened to me for the past 3 years.

Other than that my only hope is that Wolfram accidentally fixes it in some update in the same way that it was accidentally created it with the upgrade to 11.2.

POSTED BY: roger 567

(1) What I stated about not seeming to happen to other users was correctly worded. Of course I cannot know this for a fact. But when an issue of this sort is recurring, Technical Support has a way of letting that be known.

(2) That x=5 example is possibly an anomaly. My unruly Linux OS has a habit of occasionally bringing up moribund windows for Firefox, Thunderbird new messages or replies, and Mathematica. The typical symptom is that the window will require several seconds to register key strokes, and will be extremely laborious to scrol throughl. This is very clearly an OS/hardware issue, it is sporadic, and it is the type of problem that could perhaps also give the sort of Mathematica behavior you indicated with that particular example. Another possibility is that that particular starting of the Kernel process happened to run you out of RAM on that occasion. But I suspect the more typical crash case you report is caused by some specific issue inside the Mathematica Kernel rather than issues with your OS/hardware configurations, if (big if) most of the instances share a small group of types of computations, e.g. machine arithmetic linear algebra, or symbolic definite integrals, or linear optimizations, or...

(3) Do you have a TS report number? I can probably track down a crashing example notebook with that information.

POSTED BY: Daniel Lichtblau
Posted 4 years ago

It may well be a hardware/OS issue, but it has happened on 4 different PCs. All had very different hardware in terms of processors, motherboards, graphics cards etc., but all were running Windows 10 Pro and all were on the same network. The PC I am currently trying it on has not hosted Mathematica before, but is exhibiting the same symptoms as the others.

I have not noticed any commonality in the calculation types that fail and even if x=5; is an anomaly (it is certainly not typical), failures often happen early in an evaluating notebook and those that use little RAM or other resources.

The most recent technical support case number was 4266662.

POSTED BY: roger 567

Has anyone else had this problem and found a solution?

This is not a general problem, but a crash bug triggered by something specific you do. Wolfram will only be able to fix this if you can identify the specific command, or sequence of commands, that causes the crash. Sometimes crashes are not fully deterministic, but there is still one specific evaluation that causes them (just not 100% of the time).

In short, the only thing that can be done is to track down the offending evaluation (which, admittedly, is often a lot of work). Once you do, report it, and hopefully Wolfram will fix it. You can also ask here (or on https://mathematica.stackexchange.com/) for an alternative way to perform the same operation without a crash.

POSTED BY: Szabolcs Horvát
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract