# Infor LN bshell Process Stuck at 100% CPU: How to Diagnose and Fix It

> Source: https://netray.co/erp-help/ln-bshell-high-cpu-hung-session-fix
> Publisher: Netray (netray.co), AI and integration engineering for ERP and manufacturing systems.
> Section: ERP Help

## Short answer

A bshell process pinned at 100% CPU on the Infor LN application server almost always means one session is stuck in a 4GL loop, scanning an unindexed table, or waiting on a database lock. End the session from the Sessions Monitor first, then kill the OS process only if that fails, and check for a blocking database transaction before assuming it is a bug.

## Kind

error

## System

infor-ln

## Erp

Infor LN (Baan ERP)

## Module

System Administration / Performance

## Query

infor ln bshell process using 100% cpu

## Alternate Queries

- bshell not responding infor ln
- infor ln session hangs bshell.exe
- baan bshell process stuck at 100 percent
- infor ln application server high cpu

## Applies To

Infor LN 10.x (10.5-10.7) on Windows and UNIX/Linux application servers; the bshell runtime is the same core component back to Baan IV and BaanERP

## Steps

### Diagnose and clear a hung bshell process

**Items:**

On Windows, open Task Manager on the LN application/enterprise server and sort by CPU; on UNIX/Linux run top or ps -ef | grep bshell to find the offending process ID (PID).

Match the PID to a user session in the Sessions Monitor (Tools > Session Management > Sessions) and confirm it has been Active far longer than that type of session normally runs.

Check what the session was doing before the hang: a 4GL loop with no exit condition, a report scanning an unindexed table, or a wait on a database lock are the three most common causes.

If the process is genuinely stuck, end the session from LN's own Sessions tool first, so shared memory and semaphores are cleaned up properly, rather than killing the OS process directly.

If that does not clear it, kill the OS process (taskkill /PID on Windows, kill -9 on UNIX/Linux) and run any orphaned-resource cleanup your platform provides (ipcs/ipcrm on UNIX for leftover semaphores).

Check the database for a blocking lock tied to the session (sp_who2 or sys.dm_exec_requests on SQL Server, v$lock on Oracle) and release it if the process is gone but the lock remains.

Review the session's own trace or log output for the last statements executed, to identify the exact program or report that triggered the spin.

If the same program repeatedly causes this, route it to development: it is almost always a missing index, a missing loop exit condition, or a DAL event calling itself indirectly.

## Sections

### What bshell actually is

**Body:**

bshell is the runtime engine that executes compiled Infor LN 4GL programs. Every LN session, whether opened from the Windows client, the web UI, or a batch job, runs inside its own bshell process on the application (enterprise) server. When a session looks frozen to the user, the underlying bshell process is almost always still alive and either spinning on CPU or waiting on a resource.

Because bshell processes are one per session, a single runaway session shows up as one process pinned near 100% CPU rather than the whole server slowing down evenly. That is the first useful signal: check per-process CPU, not overall server load, before assuming a system-wide problem.

### The three real causes

**Body:**

Most bshell CPU spikes trace back to one of three things: a custom 4GL program stuck in a tight loop with no reliable exit condition, a report or query scanning a large table without a usable index, or a session waiting on a database row or table lock held by another process. Only the last one is not actually a CPU problem, it just looks like one because the client appears frozen.

Custom code is the most common offender in practice. A DAL trigger or table event that ends up calling itself indirectly, or a report loop that never advances its cursor, pins CPU at 100% indefinitely because LN does not impose a default execution time limit on 4GL code.

**Code:**

- ps -ef | grep bshell
- top -p <PID>
- taskkill /PID <pid> /F   (Windows)
- kill -9 <pid>            (UNIX/Linux)

### Confirming it is a lock, not a loop

**Body:**

If the bshell process is using very little CPU but the user still cannot proceed, it is waiting, not looping. Query the database for blocking sessions and match the client connection back to the LN session through the Sessions Monitor or the connection's program name.

Clearing the block by committing or killing the blocking transaction resolves the symptom immediately, but always find out why that transaction was left open, a client that crashed without a commit or rollback, or a batch job that failed mid-transaction, so it does not recur.

### Preventing repeat hangs

**Body:**

Index the tables used by custom reports and DAL queries, particularly ones filtered on non-key fields; an unindexed filter on a large transaction table is a very common trigger on sites where Baan IV or BaanERP data was migrated into LN without revisiting custom indexes.

Add explicit exit conditions and iteration limits to custom 4GL loops, and review any DAL event that could call the same table's events recursively. Move heavy batch reporting to job queue windows rather than interactive sessions where possible.

## Pitfalls

- Killing the OS process without ending the LN session first, which can leave orphaned semaphores and shared memory that keep a license slot marked as in use.
- Assuming every high-CPU bshell is a bug in custom code; an unindexed standard report against a very large table can do the same thing on data-heavy sites.
- Not checking for a database lock before troubleshooting the process itself, which wastes time chasing a CPU problem that is really a blocking transaction.
- Restarting the whole application server to clear one hung session, when ending the individual session or killing one process is usually enough.
- Not correlating the OS process ID back to a specific user and program before killing it, which makes root cause analysis afterward much harder.

## Ai Angle

An AI assistant grounded in the LN environment (Netray's ERPray) can shortcut the diagnosis: pointed at the Sessions Monitor, the application server logs, and the database's active session list, it can correlate a high-CPU bshell process with the user, program and table involved in seconds, and note whether that program has hung before. It does not kill processes or end sessions itself, that stays a controlled admin action, but it removes the manual log-and-lock hunting that normally takes the first stretch of this kind of incident.

## Faq

### Is bshell a virus or malware?

**Answer:** No. bshell (or bshell.exe on Windows) is the legitimate Infor LN 4GL runtime process. Antivirus tools sometimes flag it because it is unsigned or runs from a non-standard directory, but it is a core part of the LN application server and should not be removed.

### How many bshell processes should be running?

**Answer:** Roughly one per active LN session, plus a smaller number for background job queue workers. If you see far more processes than logged-in users, check for orphaned sessions that failed to close properly and clean them up through the Sessions Monitor.

### Can I set a CPU or time limit on bshell processes?

**Answer:** LN itself does not offer a built-in execution timeout for 4GL programs. Some sites use OS-level process limits (Windows Job Objects, UNIX ulimit or cgroups) as a safety net, but the better fix is correcting the underlying loop or missing index.

### Why does this happen more often right after a data migration?

**Answer:** Newly migrated tables often lose custom indexes that existed in the legacy environment, or grow far larger than the test data used before go-live. Reports and DAL queries that were fine on a small dataset can scan millions of rows and pin CPU once real volumes are loaded.

## Search terms

infor ln bshell high cpu, bshell process stuck, infor ln session hangs, baan bshell not responding, infor ln application server performance, infor ln session monitor, kill bshell process infor ln, infor ln database lock session, baan erp runtime process, infor ln enterprise server troubleshooting

---
Talk to an engineer: https://netray.co/contact?intent=erp_ai | Machine catalog: https://netray.co/agent/catalog.json
